summary refs log tree commit diff
path: root/synapse/storage/schema
diff options
context:
space:
mode:
authorPatrick Cloke <patrickc@matrix.org>2023-11-09 14:21:33 -0500
committerPatrick Cloke <patrickc@matrix.org>2023-11-09 14:21:33 -0500
commit626f468155be2d3ab8c69cd7c1bf1e85951935e7 (patch)
tree1aabb79cece112b4624cfaabfbd24f4473945d93 /synapse/storage/schema
parentMerge remote-tracking branch 'origin/develop' into clokep/psycopg3 (diff)
downloadsynapse-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.py4
-rw-r--r--synapse/storage/schema/main/delta/69/01as_txn_seq.py4
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