summary refs log tree commit diff
path: root/scripts
diff options
context:
space:
mode:
authorRichard van der Hoff <richard@matrix.org>2021-05-12 12:57:55 +0100
committerRichard van der Hoff <richard@matrix.org>2021-05-12 12:57:55 +0100
commitb0b8110acd7275285e3fb5dc68de5eb684a0cabe (patch)
treeb9b821988bdcb072fc90750fcec9ec2e3d46c9db /scripts
parentMerge branch 'release-v1.33.2' into matrix-org-hotfixes (diff)
parentTests for to-device messages (#9965) (diff)
downloadsynapse-b0b8110acd7275285e3fb5dc68de5eb684a0cabe.tar.xz
Merge remote-tracking branch 'origin/develop' into matrix-org-hotfixes
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/synapse_port_db18
1 files changed, 10 insertions, 8 deletions
diff --git a/scripts/synapse_port_db b/scripts/synapse_port_db

index f0c93d5226..5fb5bb35f7 100755 --- a/scripts/synapse_port_db +++ b/scripts/synapse_port_db
@@ -913,10 +913,11 @@ class Porter(object): (curr_forward_id + 1,), ) - txn.execute( - "ALTER SEQUENCE events_backfill_stream_seq RESTART WITH %s", - (curr_backward_id + 1,), - ) + if curr_backward_id: + txn.execute( + "ALTER SEQUENCE events_backfill_stream_seq RESTART WITH %s", + (curr_backward_id + 1,), + ) await self.postgres_store.db_pool.runInteraction( "_setup_events_stream_seqs", _setup_events_stream_seqs_set_pos, @@ -954,10 +955,11 @@ class Porter(object): (curr_chain_id,), ) - await self.postgres_store.db_pool.runInteraction( - "_setup_event_auth_chain_id", r, - ) - + if curr_chain_id is not None: + await self.postgres_store.db_pool.runInteraction( + "_setup_event_auth_chain_id", + r, + ) ##############################################