A bit cleaner way of selecting map pairs, bunch of other cleanup crap generally characterized as removing generated Rails code
This commit is contained in:
@@ -2,15 +2,18 @@ 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, [:name]
|
||||
add_index :maps, [:points]
|
||||
end
|
||||
|
||||
def self.down
|
||||
remove_index :maps, [:name]
|
||||
remove_index :maps, [:points]
|
||||
drop_table :maps
|
||||
remove_index :maps, :name
|
||||
end
|
||||
end
|
||||
|
@@ -9,11 +9,13 @@ class CreateMashes < ActiveRecord::Migration
|
||||
t.timestamps
|
||||
end
|
||||
|
||||
add_index :mashes, :winner
|
||||
add_index :mashes, [:winner]
|
||||
add_index :mashes, [:requester]
|
||||
end
|
||||
|
||||
def self.down
|
||||
remove_index :mashes, [:winner]
|
||||
remove_index :mashes, [:requester]
|
||||
drop_table :mashes
|
||||
remove_index :mashes, :winner
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user