class MigrateGuardianNameForAllReleases < ActiveRecord::DataMigration
  RELEASES = ["AppearanceRelease", "TalentRelease"]

  def up
    say 'Migrating guardian name ...'

    RELEASES.each do |release|
      release.constantize.find_each do |record|
        if record.guardian_name_old.present?
          record.update(guardian_name: record.guardian_name_old)
        end
      end
    end

    say 'Done'
  end
end