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: 20180202131547_change_dropoff_location_to_donation_site.rb
    path of file: ./repos/human-essentials/db/migrate
    
    the code of the file until where you have to start completion: # There w
    
  def up
    remove_index :donations, :dropoff_location_id if index_exists?(:donations, :dropoff_location_id)
    remove_index :dropoff_locations, :organization_id if index_exists?(:dropoff_locations, :organization_id)
    
    rename_table :dropoff_locations, :donation_sites unless table_exists?(:donation_sites)
    rename_column :donations, :dropoff_location_id, :donation_site_id unless column_exists?(:donations, :donation_site_id)

    add_index :donations, :donation_site_id, :name => "index_donations_on_donation_site_id" unless index_exists?(:donations, :donation_site_id)
    add_index :donation_sites, :organization_id, :name => "index_donation_sites_on_organization_id" unless index_exists?(:donation_sites, :organization_id)
  end