Hi,
I’m wondering if anyone has experienced problems with losing default
column values when running a migration. I have a column that defaults
to a value of 0, yet when I run a migration I lose the default value
which reverts to NULL. My migration is simple:
class RenameRecentLocationId < ActiveRecord::Migration
def self.up
rename_column :devices, :recent_location_id, :recent_reading_id
end
def self.down
rename_column :devices, :recent_reading_id, :recent_location_id
end
end
Am I missing something or is this a known issue? Thanks in advance
for any light you can shed on the problem.
Best regards,
Dennis