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
|
@@ -9,6 +9,21 @@
|
||||
#
|
||||
# It's strongly recommended to check this file into your version control system.
|
||||
|
||||
ActiveRecord::Schema.define(:version => 0) do
|
||||
ActiveRecord::Schema.define(:version => 20120304164625) do
|
||||
|
||||
create_table "maps", :force => true do |t|
|
||||
t.string "name"
|
||||
t.datetime "created_at"
|
||||
t.datetime "updated_at"
|
||||
end
|
||||
|
||||
create_table "mashes", :force => true do |t|
|
||||
t.string "requester"
|
||||
t.integer "map_a"
|
||||
t.integer "map_b"
|
||||
t.integer "winner"
|
||||
t.datetime "created_at"
|
||||
t.datetime "updated_at"
|
||||
end
|
||||
|
||||
end
|
||||
|
Reference in New Issue
Block a user