21 lines
594 B
Ruby
21 lines
594 B
Ruby
class CreateMashTournamentRounds < ActiveRecord::Migration
|
|
def self.up
|
|
create_table :mash_tournament_rounds do |t|
|
|
t.references :mash_tournament
|
|
t.integer :number, :null => false
|
|
t.integer :mash_count, :null => false
|
|
|
|
t.timestamps
|
|
end
|
|
|
|
add_index :mash_tournament_rounds, [:mash_tournament_id, :number]
|
|
add_index :mash_tournament_rounds, [:mash_count]
|
|
end
|
|
|
|
def self.down
|
|
remove_index :mash_tournament_rounds, [:mash_tournament_id, :number]
|
|
remove_index :mash_tournament_rounds, [:mash_count]
|
|
drop_table :mash_tournament_rounds
|
|
end
|
|
end
|