Files
grecia/db/migrate/20190325184500_remove_deprecated_translatable_fields_from_budgets.rb
Javi Martín 7a78776569 Bring back removal of translatable columns
Globalize does not support having translatable columns with the same
name in the original table and the translations table. We were planning
to migrate to Mobility, but we aren't doing so before releasing version
1.1.

We've also found a gotcha regarding having both columns: if we use the
`update_column` method, which we use in rake tasks to speed up the
process and in tests where we want to skip validations and callbacks, we
update the column in the original table and no exception is raised. If
we remove the column in the original table, we get an exception, which
is what we want since our intention is to update the column in the
translations table.

With this change we're following the advice given by the Mobility lead
developer: "If you don't need the columns, I think it would make sense
to just remove them to avoid any edge case issues."

This commit reverts commit 251326ea.
2019-11-07 22:01:43 +01:00

6 lines
149 B
Ruby

class RemoveDeprecatedTranslatableFieldsFromBudgets < ActiveRecord::Migration[4.2]
def change
remove_column :budgets, :name, :string
end
end