def METHOD_NAME():
    for table, oldname, newname in renames:
        op.execute(
            sa.DDL(
                'ALTER TABLE "{table}" RENAME CONSTRAINT "{oldname}" TO "{newname}";'.format(
                    table=table, oldname=oldname, newname=newname
                )
            )
        )
    op.create_check_constraint('category_name_check', 'category', sa.text("name <> ''"))
    op.create_unique_constraint(
        'customer_order_access_token_key', 'customer_order', ['access_token']
    )
    op.drop_column('discount_coupon', 'used_at')
    op.create_check_constraint(
        'discount_policy_name_check', 'discount_policy', sa.text("name <> ''")
    )
    op.alter_column('item', 'assignee_details', server_default='{}')
    op.execute(
        sa.DDL(
            "UPDATE item SET assignee_details = '{}' WHERE assignee_details IS NULL;"
        )
    )
    op.alter_column('item', 'assignee_details', nullable=False, existing_nullable=True)
    op.create_check_constraint('item_name_check', 'item', sa.text("name <> ''"))
    op.create_check_constraint(
        'item_collection_name_check', 'item_collection', sa.text("name <> ''")
    )
    op.create_check_constraint(
        'organization_name_check', 'organization', sa.text("name <> ''")
    )
    op.create_check_constraint('price_name_check', 'price', sa.text("name <> ''"))
    op.drop_index('ix_online_payment_pg_paymentid', 'online_payment')
    op.create_unique_constraint(
        'online_payment_pg_paymentid_key', 'online_payment', ['pg_paymentid']
    )
    op.drop_index('ix_payment_transaction_pg_refundid', 'payment_transaction')
    op.create_unique_constraint(
        'payment_transaction_pg_refundid_key', 'payment_transaction', ['pg_refundid']
    )
    op.drop_index('ix_line_item_previous_id', 'line_item')
    op.create_unique_constraint(
        'line_item_previous_id_key', 'line_item', ['previous_id']
    )