def METHOD_NAME(apps, schema_editor):  # pragma: no cover
    """
    Reverse the "update" process.
    Here we may be in the situation that the legacy "Currency" table is empty,
    and so we have to re-populate it based on the new price_currency codes.
    """
    print("Reversing currency migration...")
    cursor = connection.cursor()
    # Extract a list of currency codes which are in use
    response = cursor.execute(f'SELECT id, price, price_currency from part_partsellpricebreak;')
    results = cursor.fetchall()
    codes_in_use = set()
    for index, row in enumerate(results):
        pk, price, code = row
        codes_in_use.add(code)
        # Copy the 'price' field back into the 'cost' field
        response = cursor.execute(f'UPDATE part_partsellpricebreak set cost={price} where id={pk};')
    # Keep a dict of which currency objects map to which code
    code_map = {}
    # For each currency code in use, check if we have a matching Currency object
    for code in codes_in_use:
        response = cursor.execute(f"SELECT id, suffix from common_currency where suffix='{code}';")
        row = cursor.fetchone()
        if row is not None:
            # A match exists!
            pk, suffix = row
            code_map[suffix] = pk
        else:
            # No currency object exists!
            description = CURRENCIES[code]
            # Create a new object in the database
            print(f"Creating new Currency object for {code}")
            # Construct a query to create a new Currency object
            query = f"INSERT into common_currency (symbol, suffix, description, value, base) VALUES ('$', '{code}', '{description}', 1.0, False);"
            response = cursor.execute(query)
            code_map[code] = cursor.lastrowid
    # Ok, now we know how each suffix maps to a Currency object
    for suffix in code_map.keys():
        pk = code_map[suffix]
        # Update the table to point to the Currency objects
        print(f"Currency {suffix} -> pk {pk}")
        response = cursor.execute(f"UPDATE part_partsellpricebreak set currency_id={pk} where price_currency='{suffix}';")