Sha256: 1a3fd07cafed9dee72ff7bc3b587fb506ed3fb78200491b19a6ee705425cf55e

Contents?: true

Size: 594 Bytes

Versions: 46

Compression:

Stored size: 594 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, [:item_id, :user_group_id], unique: true
  end

  def self.down
    drop_table :lending_policies
  end
end

Version data entries

46 entries across 46 versions & 8 rubygems

Version Path
enju_event-0.3.0.beta.1 spec/dummy/db/migrate/20090831220301_create_lending_policies.rb
enju_ndl-0.3.0.beta.1 spec/dummy/db/migrate/20090831220301_create_lending_policies.rb
enju_bookmark-0.3.0.beta.1 spec/dummy/db/migrate/20090831220301_create_lending_policies.rb
enju_library-0.3.0.beta.2 spec/dummy/db/migrate/20090831220301_create_lending_policies.rb
enju_seed-0.3.0.beta.6 spec/dummy/db/migrate/20090831220301_create_lending_policies.rb
enju_biblio-0.3.0.beta.2 spec/dummy/db/migrate/20090831220301_create_lending_policies.rb