You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
box-o-sand/map-mash/db/migrate/20120310035133_create_mash_...

21 lines
594 B

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