Sha256: dcf7d75133c53f331af7b17b1e9b719055e23ae6de88adc8d26441d7c39c8d24

Contents?: true

Size: 658 Bytes

Versions: 8

Compression:

Stored size: 658 Bytes

Contents

class CreateLendingPolicies < ActiveRecord::Migration
  def self.up
    create_table :lending_policies do |t|
      t.references :item, index: false, foreign_key: true, null: false
      t.references :user_group, index: false, foreign_key: true, null: false
      t.integer :loan_period, default: 0, null: false
      t.datetime :fixed_due_date
      t.integer :renewal, default: 0, null: false
      t.integer :fine, default: 0, null: false
      t.text :note
      t.integer :position

      t.timestamps
    end
    add_index :lending_policies, [:item_id, :user_group_id], :unique => true
  end

  def self.down
    drop_table :lending_policies
  end
end

Version data entries

8 entries across 8 versions & 2 rubygems

Version Path
enju_inter_library_loan-0.2.0 spec/dummy/db/migrate/20090831220301_create_lending_policies.rb
enju_circulation-0.2.5 db/migrate/20090831220301_create_lending_policies.rb
enju_circulation-0.2.4 db/migrate/20090831220301_create_lending_policies.rb
enju_circulation-0.2.3 db/migrate/20090831220301_create_lending_policies.rb
enju_circulation-0.2.2 db/migrate/20090831220301_create_lending_policies.rb
enju_circulation-0.2.1 db/migrate/20090831220301_create_lending_policies.rb
enju_circulation-0.2.0 db/migrate/20090831220301_create_lending_policies.rb
enju_circulation-0.2.0.beta.4 db/migrate/20090831220301_create_lending_policies.rb