d834b81003
git-subtree-dir: map-mash git-subtree-mainline:eacc351b17
git-subtree-split:7f16409d12
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
|