Files
grecia/db/migrate/20190121171237_add_budget_heading_translations.rb
Javi Martín 55addaa58a Apply rubocop rules to migration files
There are some rules which only affect migration files, and we cannot
enable them if we're excluding those files from being inspected.

We're also changing migrations related to the Rails/TimeZone rule
slightly because these fields were already changed afterwards, so we
aren't changing the schema.
2019-10-24 20:35:13 +02:00

15 lines
278 B
Ruby

class AddBudgetHeadingTranslations < ActiveRecord::Migration[4.2]
def self.up
Budget::Heading.create_translation_table!(
{
name: :string
},
{ migrate_data: true }
)
end
def self.down
Budget::Heading.drop_translation_table!
end
end