Browse Source

Add migration to accompany 55fbd06305

denney-disable-on-select
John N. Milner 12 years ago
parent
commit
941f7a267b
  1. 13
      db/migrate/20130405012238_alter_bike.rb

13
db/migrate/20130405012238_alter_bike.rb

@ -0,0 +1,13 @@
class AlterBike < ActiveRecord::Migration
def up
add_column(:bikes, :shop_id, :string)
add_index :bikes, :shop_id, :unique => true
remove_index :bikes, :column => :serial_number
end
def down
remove_index :bikes, :column => :shop_id
remove_column(:bikes, :shop_id)
add_index :bikes, :serial_number, :unique => true
end
end
Loading…
Cancel
Save