Sha256: a0c3a01d4a988d2da632753b5fc7fc43c614f5b08bf8056c1f8ca8255eaa5007

Contents?: true

Size: 593 Bytes

Versions: 8

Compression:

Stored size: 593 Bytes

Contents

class CreateLendingPolicies < ActiveRecord::Migration[4.2]
  def self.up
    create_table :lending_policies do |t|
      t.integer :item_id, null: false
      t.integer :user_group_id, 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, %i[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_leaf-1.3.2 spec/dummy/db/migrate/20090831220301_create_lending_policies.rb
enju_biblio-0.3.2 spec/dummy/db/migrate/20090831220301_create_lending_policies.rb
enju_leaf-1.3.1 spec/dummy/db/migrate/20090831220301_create_lending_policies.rb
enju_biblio-0.3.1 spec/dummy/db/migrate/20090831220301_create_lending_policies.rb
enju_leaf-1.3.0 spec/dummy/db/migrate/20090831220301_create_lending_policies.rb
enju_biblio-0.3.0 spec/dummy/db/migrate/20090831220301_create_lending_policies.rb
enju_leaf-1.3.0.rc.1 spec/dummy/db/migrate/20090831220301_create_lending_policies.rb
enju_biblio-0.3.0.rc.1 spec/dummy/db/migrate/20090831220301_create_lending_policies.rb