Sha256: cb1f2d611f8bbe57cd563d1618cbd1ecbe36a99050c3094970f19ab6385bf280

Contents?: true

Size: 1002 Bytes

Versions: 29

Compression:

Stored size: 1002 Bytes

Contents

class CreateItems < ActiveRecord::Migration
  def change
    create_table :items do |t|
      #t.integer :manifestation_id
      t.string :call_number
      t.string :item_identifier
      t.timestamps
      t.datetime :deleted_at
      t.integer :shelf_id, :default => 1, :null => false
      t.boolean :include_supplements, :default => false, :null => false
      t.integer :checkouts_count, :default => 0, :null => false
      t.integer :owns_count, :default => 0, :null => false
      t.integer :resource_has_subjects_count, :default => 0, :null => false
      t.text :note
      t.string :url
      t.integer :price
      t.integer :lock_version, :default => 0, :null => false
      t.integer :required_role_id, :default => 1, :null => false
      t.string :state
      t.integer :required_score, :default => 0, :null => false
    end
    #add_index :items, :manifestation_id
    add_index :items, :shelf_id
    add_index :items, :item_identifier
    add_index :items, :required_role_id
  end
end

Version data entries

29 entries across 29 versions & 2 rubygems

Version Path
enju_circulation-0.1.0.pre36 spec/dummy/db/migrate/006_create_items.rb
enju_library-0.1.0.pre33 spec/dummy/db/migrate/006_create_items.rb
enju_circulation-0.1.0.pre35 spec/dummy/db/migrate/006_create_items.rb
enju_circulation-0.1.0.pre34 spec/dummy/db/migrate/006_create_items.rb
enju_library-0.1.0.pre32 spec/dummy/db/migrate/006_create_items.rb
enju_library-0.1.0.pre31 spec/dummy/db/migrate/006_create_items.rb
enju_circulation-0.1.0.pre33 spec/dummy/db/migrate/006_create_items.rb
enju_library-0.1.0.pre30 spec/dummy/db/migrate/006_create_items.rb
enju_library-0.1.0.pre29 spec/dummy/db/migrate/006_create_items.rb
enju_circulation-0.1.0.pre32 spec/dummy/db/migrate/006_create_items.rb
enju_library-0.1.0.pre28 spec/dummy/db/migrate/006_create_items.rb
enju_library-0.1.0.pre27 spec/dummy/db/migrate/006_create_items.rb
enju_circulation-0.1.0.pre31 spec/dummy/db/migrate/006_create_items.rb
enju_library-0.1.0.pre26 spec/dummy/db/migrate/006_create_items.rb
enju_circulation-0.1.0.pre30 spec/dummy/db/migrate/006_create_items.rb
enju_library-0.1.0.pre25 spec/dummy/db/migrate/006_create_items.rb
enju_circulation-0.1.0.pre29 spec/dummy/db/migrate/006_create_items.rb
enju_library-0.1.0.pre24 spec/dummy/db/migrate/006_create_items.rb
enju_circulation-0.1.0.pre28 spec/dummy/db/migrate/006_create_items.rb
enju_circulation-0.1.0.pre27 spec/dummy/db/migrate/006_create_items.rb