Sha256: 1b7defa1a9c7c72c44b57f7557d8ae9ae8f50427577d91f3f5a500b91e752624

Contents?: true

Size: 616 Bytes

Versions: 286

Compression:

Stored size: 616 Bytes

Contents

class CreateLendingPolicies < ActiveRecord::Migration
  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

286 entries across 279 versions & 12 rubygems

Version Path
enju_event-0.2.0.beta.1 spec/dummy/db/migrate/20090831220301_create_lending_policies.rb
enju_biblio-0.2.0.beta.1 spec/dummy/db/migrate/20090831220301_create_lending_policies.rb
enju_library-0.2.0.beta.1 spec/dummy/db/migrate/20090831220301_create_lending_policies.rb
enju_leaf-1.2.0.beta.1 spec/dummy/db/migrate/20090831220301_create_lending_policies.rb
enju_leaf-1.1.4 spec/dummy/db/migrate/20090831220301_create_lending_policies.rb
enju_library-0.1.2 spec/dummy/db/migrate/20090831220301_create_lending_policies.rb
enju_biblio-0.1.3 spec/dummy/db/migrate/20090831220301_create_lending_policies.rb
enju_circulation-0.1.2 db/migrate/20090831220301_create_lending_policies.rb
enju_event-0.1.19 spec/dummy/db/migrate/20090831220301_create_lending_policies.rb
enju_leaf-1.1.3 spec/dummy/db/migrate/20090831220301_create_lending_policies.rb
enju_grid-0.1.1 spec/dummy/db/migrate/20090831220301_create_lending_policies.rb
enju_inter_library_loan-0.1.1 spec/dummy/db/migrate/20090831220301_create_lending_policies.rb
enju_oai-0.1.1 spec/dummy/db/migrate/20090831220301_create_lending_policies.rb
enju_bookmark-0.1.3 spec/dummy/db/migrate/20090831220301_create_lending_policies.rb
enju_flower-0.1.1 spec/dummy/db/migrate/20090831220301_create_lending_policies.rb
enju_biblio-0.1.2 spec/dummy/db/migrate/20090831220301_create_lending_policies.rb
enju_library-0.1.1 spec/dummy/db/migrate/20090831220301_create_lending_policies.rb
enju_circulation-0.1.1 db/migrate/20090831220301_create_lending_policies.rb
enju_ndl-0.1.1 spec/dummy/db/migrate/20090831220301_create_lending_policies.rb
enju_event-0.1.18 spec/dummy/db/migrate/20090831220301_create_lending_policies.rb