diff options
author | Patrick Cloke <patrickc@matrix.org> | 2023-11-09 14:21:33 -0500 |
---|---|---|
committer | Patrick Cloke <patrickc@matrix.org> | 2023-11-09 14:21:33 -0500 |
commit | 626f468155be2d3ab8c69cd7c1bf1e85951935e7 (patch) | |
tree | 1aabb79cece112b4624cfaabfbd24f4473945d93 /synapse/storage/schema | |
parent | Merge remote-tracking branch 'origin/develop' into clokep/psycopg3 (diff) | |
download | synapse-626f468155be2d3ab8c69cd7c1bf1e85951935e7.tar.xz |
Backout unneeded changes.
Diffstat (limited to 'synapse/storage/schema')
-rw-r--r-- | synapse/storage/schema/main/delta/56/unique_user_filter_index.py | 4 | ||||
-rw-r--r-- | synapse/storage/schema/main/delta/69/01as_txn_seq.py | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/synapse/storage/schema/main/delta/56/unique_user_filter_index.py b/synapse/storage/schema/main/delta/56/unique_user_filter_index.py index 29a2f7b65d..2461f87d77 100644 --- a/synapse/storage/schema/main/delta/56/unique_user_filter_index.py +++ b/synapse/storage/schema/main/delta/56/unique_user_filter_index.py @@ -2,7 +2,7 @@ import logging from io import StringIO from synapse.storage.database import LoggingTransaction -from synapse.storage.engines import BaseDatabaseEngine +from synapse.storage.engines import BaseDatabaseEngine, PostgresEngine from synapse.storage.prepare_database import execute_statements_from_stream logger = logging.getLogger(__name__) @@ -18,7 +18,7 @@ This migration updates the user_filters table as follows: def run_create(cur: LoggingTransaction, database_engine: BaseDatabaseEngine) -> None: - if database_engine.supports_select_distinct_on: + if isinstance(database_engine, PostgresEngine): select_clause = """ SELECT DISTINCT ON (user_id, filter_id) user_id, filter_id, filter_json FROM user_filters diff --git a/synapse/storage/schema/main/delta/69/01as_txn_seq.py b/synapse/storage/schema/main/delta/69/01as_txn_seq.py index 9dd5a27a3f..b176a4195a 100644 --- a/synapse/storage/schema/main/delta/69/01as_txn_seq.py +++ b/synapse/storage/schema/main/delta/69/01as_txn_seq.py @@ -18,11 +18,11 @@ Adds a postgres SEQUENCE for generating application service transaction IDs. """ from synapse.storage.database import LoggingTransaction -from synapse.storage.engines import BaseDatabaseEngine, PsycopgEngine +from synapse.storage.engines import BaseDatabaseEngine, PostgresEngine, PsycopgEngine def run_create(cur: LoggingTransaction, database_engine: BaseDatabaseEngine) -> None: - if database_engine.supports_sequences: + if isinstance(database_engine, PostgresEngine): # If we already have some AS TXNs we want to start from the current # maximum value. There are two potential places this is stored - the # actual TXNs themselves *and* the AS state table. At time of migration |