class TranslateProjectQoutes < ActiveRecord::Migration[5.0]
  def change
    reversible do |dir| # <=== 1
      dir.up do
        ProjectQoute.create_translation_table!({ # <=== 2
                                         text_over_quote: :text,
                                         text_quote: :text,
                                         text_below_quote: :text
                                       }, {
                                         migrate_data: true, # <=== 4
                                         remove_source_columns: true # <=== 5
                                       })
      end
      dir.down do
        ProjectQoute.drop_translation_table! migrate_data: true # <=== 6
      end
    end
  end
end
