mirror of
https://github.com/element-hq/synapse
synced 2024-09-04 07:50:05 +00:00
Use the previous MAX value if any to set the stream_id
This commit is contained in:
parent
6a6cbfcf1e
commit
647c724573
1 changed files with 2 additions and 1 deletions
|
@ -17,4 +17,5 @@ CREATE TABLE device_max_stream_id (
|
||||||
stream_id BIGINT NOT NULL
|
stream_id BIGINT NOT NULL
|
||||||
);
|
);
|
||||||
|
|
||||||
INSERT INTO device_max_stream_id (stream_id) VALUES (0);
|
INSERT INTO device_max_stream_id (stream_id)
|
||||||
|
SELECT COALESCE(MAX(stream_id), 0) FROM device_inbox;
|
||||||
|
|
Loading…
Reference in a new issue