def delete_migration(connection, basename):
    """ Delete a migration in `migrations_applied` table """
    sql = 'DELETE FROM migrations_applied WHERE name = %s'
    with connection.cursor() as cursor:
        cursor.execute(sql, (basename,))
        connection.commit()
    return True
