Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Commit

Permalink
Fix old sqlite
Browse files Browse the repository at this point in the history
  • Loading branch information
erikjohnston committed Jun 23, 2023
1 parent 57f18fb commit 2451d8d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion synapse/storage/background_updates.py
Original file line number Diff line number Diff line change
Expand Up @@ -1105,7 +1105,7 @@ def run_validate_constraint_and_delete_rows_schema_delta(
# PRIMARY KEY), and so don't need to be recreated.
txn.execute(
"""
SELECT sql FROM sqlite_schema
SELECT sql FROM sqlite_master
WHERE tbl_name = ? AND type != 'table' AND sql IS NOT NULL
""",
(table,),
Expand Down
2 changes: 1 addition & 1 deletion tests/storage/test_background_update.py
Original file line number Diff line number Diff line change
Expand Up @@ -526,7 +526,7 @@ def delta(txn: LoggingTransaction) -> None:
# Ensure the index exists in the schema.
self.get_success(
self.store.db_pool.simple_select_one_onecol(
table="sqlite_schema",
table="sqlite_master",
keyvalues={"tbl_name": "test_constraint"},
retcol="name",
)
Expand Down

0 comments on commit 2451d8d

Please sign in to comment.