mirror of
https://github.com/matrix-org/synapse.git
synced 2025-01-30 03:45:50 +00:00
Back out unneeded changes.
This commit is contained in:
parent
55193f38e5
commit
ff40f22a23
@ -19,12 +19,7 @@ This migration adds triggers to the partial_state_events tables to enforce uniqu
|
|||||||
Triggers cannot be expressed in .sql files, so we have to use a separate file.
|
Triggers cannot be expressed in .sql files, so we have to use a separate file.
|
||||||
"""
|
"""
|
||||||
from synapse.storage.database import LoggingTransaction
|
from synapse.storage.database import LoggingTransaction
|
||||||
from synapse.storage.engines import (
|
from synapse.storage.engines import BaseDatabaseEngine, PostgresEngine, Sqlite3Engine
|
||||||
BaseDatabaseEngine,
|
|
||||||
PostgresEngine,
|
|
||||||
PsycopgEngine,
|
|
||||||
Sqlite3Engine,
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
def run_create(cur: LoggingTransaction, database_engine: BaseDatabaseEngine) -> None:
|
def run_create(cur: LoggingTransaction, database_engine: BaseDatabaseEngine) -> None:
|
||||||
@ -48,7 +43,7 @@ def run_create(cur: LoggingTransaction, database_engine: BaseDatabaseEngine) ->
|
|||||||
END;
|
END;
|
||||||
"""
|
"""
|
||||||
)
|
)
|
||||||
elif isinstance(database_engine, (PostgresEngine, PsycopgEngine)):
|
elif isinstance(database_engine, PostgresEngine):
|
||||||
cur.execute(
|
cur.execute(
|
||||||
"""
|
"""
|
||||||
CREATE OR REPLACE FUNCTION check_partial_state_events() RETURNS trigger AS $BODY$
|
CREATE OR REPLACE FUNCTION check_partial_state_events() RETURNS trigger AS $BODY$
|
||||||
|
Loading…
Reference in New Issue
Block a user