diff options
author | Erik Johnston <erik@matrix.org> | 2020-10-21 18:01:25 +0100 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2020-10-21 18:01:25 +0100 |
commit | 44f727446a6434f070de41ae3323d5eb53245bfa (patch) | |
tree | 46a20e06c94e6a7103212765fd7d546a8c31b9ac | |
parent | Merge pull request #8572 from matrix-org/rav/cache_hacking/2 (diff) | |
download | synapse-github/erikj/fix_port_script.tar.xz |
Fix port script github/erikj/fix_port_script erikj/fix_port_script
-rwxr-xr-x | scripts/synapse_port_db | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/synapse_port_db b/scripts/synapse_port_db index 6c7664ad4a..9794d004f5 100755 --- a/scripts/synapse_port_db +++ b/scripts/synapse_port_db @@ -818,7 +818,7 @@ class Porter(object): "ALTER SEQUENCE events_stream_seq RESTART WITH %s", (next_id,) ) - txn.execute("SELECT -MIN(stream_ordering) FROM events") + txn.execute("SELECT GREATEST(-MIN(stream_ordering), 1) FROM events") curr_id = txn.fetchone()[0] if curr_id: next_id = curr_id + 1 |