Trying to get round generation and fill figured out TDD style

This commit is contained in:
Dan Buch
2012-03-10 21:13:03 -05:00
parent f177ecde2a
commit e1f1aa6038
6 changed files with 55 additions and 26 deletions

View File

@@ -2,18 +2,15 @@ class CreateMaps < ActiveRecord::Migration
def self.up
create_table :maps do |t|
t.string :name, :null => false
t.integer :points, :default => 0
t.timestamps
end
add_index :maps, [:name]
add_index :maps, [:points]
end
def self.down
remove_index :maps, [:name]
remove_index :maps, [:points]
drop_table :maps
end
end

View File

@@ -12,14 +12,12 @@
ActiveRecord::Schema.define(:version => 20120310035133) do
create_table "maps", :force => true do |t|
t.string "name", :null => false
t.integer "points", :default => 0
t.string "name", :null => false
t.datetime "created_at"
t.datetime "updated_at"
end
add_index "maps", ["name"], :name => "index_maps_on_name"
add_index "maps", ["points"], :name => "index_maps_on_points"
create_table "mash_tournament_rounds", :force => true do |t|
t.integer "mash_tournament_id"