Scaffolding in some mashy stuff
This commit is contained in:
13
rails/map-mash/db/migrate/20120304151123_create_maps.rb
Normal file
13
rails/map-mash/db/migrate/20120304151123_create_maps.rb
Normal file
@@ -0,0 +1,13 @@
|
||||
class CreateMaps < ActiveRecord::Migration
|
||||
def self.up
|
||||
create_table :maps do |t|
|
||||
t.string :name
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
|
||||
def self.down
|
||||
drop_table :maps
|
||||
end
|
||||
end
|
16
rails/map-mash/db/migrate/20120304164625_create_mashes.rb
Normal file
16
rails/map-mash/db/migrate/20120304164625_create_mashes.rb
Normal file
@@ -0,0 +1,16 @@
|
||||
class CreateMashes < ActiveRecord::Migration
|
||||
def self.up
|
||||
create_table :mashes do |t|
|
||||
t.string :requester
|
||||
t.integer :map_a
|
||||
t.integer :map_b
|
||||
t.integer :winner
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
|
||||
def self.down
|
||||
drop_table :mashes
|
||||
end
|
||||
end
|
Reference in New Issue
Block a user