diff options
author | David Baker <dave@matrix.org> | 2018-10-05 15:08:36 +0100 |
---|---|---|
committer | David Baker <dave@matrix.org> | 2018-10-05 15:08:36 +0100 |
commit | 497444f1fdd2c39906179b1dde8c67415e465398 (patch) | |
tree | 8b7a5a70181bc85cf09ca148656056d0d2ac884f /synapse/storage/schema/delta | |
parent | WIP e2e key backups (diff) | |
download | synapse-497444f1fdd2c39906179b1dde8c67415e465398.tar.xz |
Don't reuse backup versions
Since we don't actually delete the keys, just mark the versions as deleted in the db rather than actually deleting them, then we won't reuse versions. Fixes https://github.com/vector-im/riot-web/issues/7448
Diffstat (limited to 'synapse/storage/schema/delta')
-rw-r--r-- | synapse/storage/schema/delta/51/e2e_room_keys.sql | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/synapse/storage/schema/delta/51/e2e_room_keys.sql b/synapse/storage/schema/delta/51/e2e_room_keys.sql index 4531fd56ee..c0e66a697d 100644 --- a/synapse/storage/schema/delta/51/e2e_room_keys.sql +++ b/synapse/storage/schema/delta/51/e2e_room_keys.sql @@ -32,7 +32,8 @@ CREATE TABLE e2e_room_keys_versions ( user_id TEXT NOT NULL, version TEXT NOT NULL, algorithm TEXT NOT NULL, - auth_data TEXT NOT NULL + auth_data TEXT NOT NULL, + deleted SMALLINT DEFAULT 0 NOT NULL ); CREATE UNIQUE INDEX e2e_room_keys_versions_idx ON e2e_room_keys_versions(user_id, version); |