Files
nairobi/db/migrate/20180730213824_add_poll_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

19 lines
307 B
Ruby

class AddPollTranslations < ActiveRecord::Migration
def self.up
Poll.create_translation_table!(
{
name: :string,
summary: :text,
description: :text
},
{ migrate_data: true }
)
end
def self.down
Poll.drop_translation_table!
end
end