Compound primary key for foreign_keys table in _internal

This commit is contained in:
Simon Willison 2020-12-22 11:04:29 -08:00
commit bc1f1e1ce8
2 changed files with 2 additions and 2 deletions

View file

@ -66,7 +66,8 @@ async def init_internal_db(db):
"to" TEXT, "to" TEXT,
"on_update" TEXT, "on_update" TEXT,
"on_delete" TEXT, "on_delete" TEXT,
"match" TEXT "match" TEXT,
PRIMARY KEY (database_name, table_name, id, seq)
) )
""", """,
block=True, block=True,

View file

@ -59,7 +59,6 @@ def test_internal_foreign_keys(app_client):
"on_update", "on_update",
"on_delete", "on_delete",
"to", "to",
"rowid",
"id", "id",
"match", "match",
"database_name", "database_name",