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: 20200518095801_add_default_unit_to_existing_prices.rb
    path of file: ./repos/ekylibre/db/migrate
    
    the code of the file until where you have to start completion: class AddDefaultUnitToExistingPrices < ActiveRecord::Migration[4.2]
  def change
    reversible do |dir|

      dir.up do
      
    
  def change
    reversible do |dir|

      dir.up do
        # Set hour unit in Worker and Equipment prices from cost catalog.
        execute <<-SQL
          UPDATE catalog_items AS ci
            SET unit_id = (SELECT min(id) FROM units WHERE reference_name = 'hour_equipment')
          FROM product_nature_variants AS pnv
          WHERE ci.variant_id = pnv.id
            AND pnv.type IN ('Variants::WorkerVariant', 'Variants::EquipmentVariant')
            AND ci.catalog_id IN (SELECT id FROM catalogs WHERE usage IN ('travel_cost', 'cost'));
        SQL

      end

      dir.down do
        # NOPE
      end

    end
  end