box-o-sand/map-mash/db/migrate/20120304151123_create_maps.rb

17 lines
268 B
Ruby
Raw Normal View History

2012-03-04 16:51:35 +00:00
class CreateMaps < ActiveRecord::Migration
def self.up
create_table :maps do |t|
t.string :name, :null => false
2012-03-04 16:51:35 +00:00
t.timestamps
end
add_index :maps, [:name]
2012-03-04 16:51:35 +00:00
end
def self.down
remove_index :maps, [:name]
2012-03-04 16:51:35 +00:00
drop_table :maps
end
end