Class: CreateVitrageOwnersPiecesSlots
- Inherits:
-
ActiveRecord::Migration
- Object
- ActiveRecord::Migration
- CreateVitrageOwnersPiecesSlots
- Defined in:
- lib/generators/vitrage/templates/migrations/create_vitrage_slots.rb
Class Method Summary collapse
Class Method Details
.down ⇒ Object
13 14 15 |
# File 'lib/generators/vitrage/templates/migrations/create_vitrage_slots.rb', line 13 def self.down drop_table :vitrage_owners_pieces_slots end |
.up ⇒ Object
2 3 4 5 6 7 8 9 10 11 |
# File 'lib/generators/vitrage/templates/migrations/create_vitrage_slots.rb', line 2 def self.up create_table :vitrage_owners_pieces_slots do |t| t.references :owner, polymorphic: true, null: false, index: true t.references :piece, polymorphic: true, index: true t.integer :ordn, default: 9, null: false t. end add_index :vitrage_owners_pieces_slots, :ordn end |