Sha256: 7ef99fed9ac0981f12133ae98a5a71ed1fdb3740955f8bc0c92a3c90fe943e15
Contents?: true
Size: 731 Bytes
Versions: 45
Compression:
Stored size: 731 Bytes
Contents
class CreateCheckouts < ActiveRecord::Migration[4.2] def self.up create_table :checkouts do |t| t.integer :user_id t.integer :item_id, null: false t.integer :checkin_id t.integer :librarian_id t.integer :basket_id t.datetime :due_date t.integer :checkout_renewal_count, default: 0, null: false t.integer :lock_version, default: 0, null: false t.timestamps end add_index :checkouts, :user_id add_index :checkouts, :item_id add_index :checkouts, :basket_id add_index :checkouts, [:item_id, :basket_id], unique: true add_index :checkouts, :librarian_id add_index :checkouts, :checkin_id end def self.down drop_table :checkouts end end
Version data entries
45 entries across 45 versions & 8 rubygems