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