class TranslateProjectPhotos < ActiveRecord::Migration[5.0]
  def change
    reversible do |dir| # <=== 1
      dir.up do
        ProjectPhoto.create_translation_table!({ # <=== 2
                                         title: :string
                                       }, {
                                         migrate_data: true, # <=== 4
                                         remove_source_columns: true # <=== 5
                                       })
      end
      dir.down do
        ProjectPhoto.drop_translation_table! migrate_data: true # <=== 6
      end
    end
  end
end
