Files
grecia/db/migrate/20180730120800_add_homepage_content_translations.rb
Javi Martín be25e5fc45 Use migrate_data option for globalize
This way the task to migrate the data doesn't have to be run manually if
these migrations weren't already executed.
2018-10-23 16:29:13 +02:00

20 lines
366 B
Ruby

class AddHomepageContentTranslations < ActiveRecord::Migration
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