def METHOD_NAME(dbapi_connection, _):
    """Enforce foreign key constraints, when using sqlite backend (off by default).
    See: https://www.sqlite.org/pragma.html#pragma_foreign_keys
    """
    cursor = dbapi_connection.cursor()
    cursor.execute('PRAGMA foreign_keys=ON;')
    cursor.close()