Modifying the mash tournament schema a touch and adding a slew of scaffold-y stuff

This commit is contained in:
Dan Buch
2012-03-09 08:11:54 -05:00
parent d4dda1e9d8
commit 1fa4ffbe65
19 changed files with 399 additions and 245 deletions

View File

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

View File

@@ -22,11 +22,13 @@ ActiveRecord::Schema.define(:version => 20120309130609) do
add_index "maps", ["points"], :name => "index_maps_on_points"
create_table "mash_tournaments", :force => true do |t|
t.integer "requester_id"
t.integer "requester_id", :null => false
t.datetime "created_at"
t.datetime "updated_at"
end
add_index "mash_tournaments", ["requester_id"], :name => "index_mash_tournaments_on_requester_id"
create_table "mashes", :force => true do |t|
t.integer "requester_id", :null => false
t.integer "map_a_id", :null => false