This way the task to migrate the data doesn't have to be run manually if these migrations weren't already executed.
15 lines
259 B
Ruby
15 lines
259 B
Ruby
class AddPollQuestionTranslations < ActiveRecord::Migration
|
|
|
|
def self.up
|
|
Poll::Question.create_translation_table!(
|
|
{ title: :string },
|
|
{ migrate_data: true }
|
|
)
|
|
end
|
|
|
|
def self.down
|
|
Poll::Question.drop_translation_table!
|
|
end
|
|
|
|
end
|