I made a migration to remove a column from my first app ever about a week ago:
class RemoveHalfOrFullFromFurlough < ActiveRecord::Migration
def up
remove_column :furloughs, :half_or_full
end
def down
add_column :furloughs, :half_or_full, :decimal
end
end
I must have done something wrong because half_or_full
is still in my schema. I didn't notice until today when I tried to add the Active Admin gem. It errors out because it's trying to pull data from this zombie-column and doesn't have any idea what to do with it.
I made a number of migrations since, so I didn't think a simple rollback is an option. Maybe it is?
This is the original migration that created the column:
class AddHalfOrFullToFurloughs < ActiveRecord::Migration
def change
add_column :furloughs, :half_or_full, :decimal
end
end