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/oldstuff/map-mash/db/migrate/20120309130609_create_mash_...

20 lines
498 B

class CreateMashTournaments < ActiveRecord::Migration
def self.up
create_table :mash_tournaments do |t|
t.references :requester, :null => false
t.integer :total_rounds, :default => 1
t.timestamps
end
add_index :mash_tournaments, [:requester_id]
add_index :mash_tournaments, [:total_rounds]
end
def self.down
remove_index :mash_tournaments, [:total_rounds]
remove_index :mash_tournaments, [:requester_id]
drop_table :mash_tournaments
end
end