Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Commit

Permalink
Use setval as in the rest of the code
Browse files Browse the repository at this point in the history
  • Loading branch information
Mathieu Velten committed Sep 12, 2022
1 parent cf39ddd commit 754334b
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@ CREATE TABLE cache_invalidation_stream_by_instance (

CREATE UNIQUE INDEX cache_invalidation_stream_by_instance_id ON cache_invalidation_stream_by_instance(stream_id);

CREATE SEQUENCE cache_invalidation_stream_seq;

-- The sequence needs to begin at 2 because a bunch of code assumes that
-- get_next_id_txn will return values >= 2, cf this comment:
-- https://github.com/matrix-org/synapse/blob/b93bd95e8ab64d27ae26841020f62ee61272a5f2/synapse/storage/util/id_generators.py#L344
CREATE SEQUENCE cache_invalidation_stream_seq MINVALUE 2;
SELECT setval('cache_invalidation_stream_seq', 1);

0 comments on commit 754334b

Please sign in to comment.