mirror of https://github.com/fspc/BikeShed-1.git
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.
16 lines
355 B
16 lines
355 B
12 years ago
|
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
|