diff options
author | Erik Johnston <erik@matrix.org> | 2023-07-10 16:24:42 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-10 16:24:42 +0100 |
commit | e55a9b3e41e73f34fda781b9374935c4623f7ea9 (patch) | |
tree | 6cfa8859ae42ed28cf12470586cd3a7539e1da5f /synapse/storage/databases | |
parent | Fix building rust with nightly (#15906) (diff) | |
download | synapse-e55a9b3e41e73f34fda781b9374935c4623f7ea9.tar.xz |
Fix downgrading to previous version of Synapse (#15907)
We do this by marking the constraint as deferrable.
Diffstat (limited to 'synapse/storage/databases')
-rw-r--r-- | synapse/storage/databases/main/event_federation.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/synapse/storage/databases/main/event_federation.py b/synapse/storage/databases/main/event_federation.py index dabe603c8c..b2cda52ce5 100644 --- a/synapse/storage/databases/main/event_federation.py +++ b/synapse/storage/databases/main/event_federation.py @@ -146,7 +146,9 @@ class EventFederationWorkerStore(SignatureWorkerStore, EventsWorkerStore, SQLBas update_name="event_forward_extremities_event_id_foreign_key_constraint_update", table="event_forward_extremities", constraint_name="event_forward_extremities_event_id", - constraint=ForeignKeyConstraint("events", [("event_id", "event_id")]), + constraint=ForeignKeyConstraint( + "events", [("event_id", "event_id")], deferred=True + ), unique_columns=("event_id", "room_id"), ) |