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.
18 lines
369 B
Ruby
18 lines
369 B
Ruby
class AddHomepageContentTranslations < ActiveRecord::Migration[4.2]
|
|
def self.up
|
|
Widget::Card.create_translation_table!(
|
|
{
|
|
label: :string,
|
|
title: :string,
|
|
description: :text,
|
|
link_text: :string
|
|
},
|
|
{ migrate_data: true }
|
|
)
|
|
end
|
|
|
|
def self.down
|
|
Widget::Card.drop_translation_table!
|
|
end
|
|
end
|