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.
20 lines
498 B
20 lines
498 B
13 years ago
|
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
|