1
0
mirror of https://github.com/fspc/BikeShed-1.git synced 2025-02-28 16:53:23 -05:00
BikeShed-1/db/migrate/20130816015219_bike_condition_id_to_int.rb
Jason Denney 4d7634605c Fixing search form for bikes updated to netzke 8.4
Updated Netzke 8.4, better search styling, case insensitive search, can search associations
Fixed mistake where bikes.condition_id was a string… durrrrrr needs to be integer
2013-08-15 22:05:29 -04:00

16 lines
355 B
Ruby

class BikeConditionIdToInt < ActiveRecord::Migration
def up
#for Postgres
connection.execute(%q{
alter table bikes
alter column bike_condition_id
type integer using cast(bike_condition_id as integer)
})
end
def down
#you really don't want to go back
change_column :bikes, :bike_condition_id, :string
end
end