You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: 20140801164901_move_conference_media_to_commercial.rb
    path of file: ./repos/osem/db/migrate
    
    the code of the file until where you have to start completion: # frozen_string_literal: true

class MoveConferenceMediaToCommercial < ActiveRecord::Migration
  class TempConference < ActiveRecord::Base
    self.table_name = 'conferences'
  end

  class TempCommercial < ActiveRecord::Base
    self.table_name = 'commercials'
  end

  def chang
    
  def change
    # Move all the settings to the new object
    TempConference.all.each do |conference|
      unless TempCommercial.exists?(commercialable_id: conference.id, commercialable_id: 'Conference')
        unless conference.media_id.blank? || conference.media_type.blank?
          TempCommercial.create(commercial_id:       conference.media_id,
                                commercial_type:     conference.media_type,
                                commercialable_id:   conference.id,
                                commercialable_type: 'Conference')
        end
      end