box-o-sand/rails/map-mash/db/migrate/20120309130609_create_mash_tournaments.rb

17 lines
352 B
Ruby
Raw Normal View History

2012-03-09 13:06:25 +00:00
class CreateMashTournaments < ActiveRecord::Migration
def self.up
create_table :mash_tournaments do |t|
t.references :requester, :null => false
2012-03-09 13:06:25 +00:00
t.timestamps
end
add_index :mash_tournaments, [:requester_id]
2012-03-09 13:06:25 +00:00
end
def self.down
drop_table :mash_tournaments
remove_index :mash_tournaments, [:requester_id]
2012-03-09 13:06:25 +00:00
end
end