class CreateVitrageOwnersPiecesSlots

Public Class Methods

down() click to toggle source
# File lib/generators/vitrage/templates/migrations/create_vitrage_slots.rb, line 13
def self.down
  drop_table :vitrage_owners_pieces_slots
end
up() click to toggle source
# 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.timestamps
  end

  add_index :vitrage_owners_pieces_slots, :ordn
end