summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorAndrej Shadura <andrewsh@debian.org>2021-05-17 16:17:35 +0200
committerAndrej Shadura <andrewsh@debian.org>2021-05-17 16:17:35 +0200
commit15f5aeb7b449ed6d5c61403d72fbc81583c1b0cc (patch)
tree98d89365b8a6932cfe7961ab3a488b2b4c5a91fe /scripts
parent8b13141dd36d5784fe820afa06aa21a0c5735155 (diff)
New upstream version 1.34.0
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 f0c93d52..5fb5bb35 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,
+ )
##############################################