Velocipede's User, Sales, and Bike Inventory Web App
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

13 lines
355 B

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