class AddExploitableRightsToAcquiredMediaReleases < ActiveRecord::Migration[6.0]
  def change
    rename_column :acquired_media_releases, :territory, :territory_old
    rename_column :acquired_media_releases, :term, :term_old

    add_reference :acquired_media_releases, :applicable_medium, foreign_key: true
    add_column :acquired_media_releases, :applicable_medium_text, :string
    add_reference :acquired_media_releases, :territory, foreign_key: true
    add_column :acquired_media_releases, :territory_text, :string
    add_reference :acquired_media_releases, :term, foreign_key: true
    add_column :acquired_media_releases, :term_text, :string
    add_reference :acquired_media_releases, :restriction, foreign_key: true
    add_column :acquired_media_releases, :restriction_text, :string
  end
end
