summary refs log tree commit diff
path: root/synapse/storage/schema
diff options
context:
space:
mode:
authorHubert Chathi <hubert@uhoreg.ca>2019-08-28 17:17:21 -0700
committerHubert Chathi <hubert@uhoreg.ca>2019-08-28 17:17:21 -0700
commit3b0b22cb059f7dfd1d7a7878fe391be38ee91d71 (patch)
tree953c94f743e2d17c01357f6a733b8dda8f12b218 /synapse/storage/schema
parentmake isort happy (diff)
downloadsynapse-3b0b22cb059f7dfd1d7a7878fe391be38ee91d71.tar.xz
use stream ID generator instead of timestamp
Diffstat (limited to 'synapse/storage/schema')
-rw-r--r--synapse/storage/schema/delta/56/signing_keys.sql6
1 files changed, 3 insertions, 3 deletions
diff --git a/synapse/storage/schema/delta/56/signing_keys.sql b/synapse/storage/schema/delta/56/signing_keys.sql
index 6a9ef1782e..27a96123e3 100644
--- a/synapse/storage/schema/delta/56/signing_keys.sql
+++ b/synapse/storage/schema/delta/56/signing_keys.sql
@@ -20,11 +20,11 @@ CREATE TABLE IF NOT EXISTS e2e_cross_signing_keys (
     keytype TEXT NOT NULL,
     -- the full key information, as a json-encoded dict
     keydata TEXT NOT NULL,
-    -- time that the key was added
-    added_ts BIGINT NOT NULL
+    -- for keeping the keys in order, so that we can fetch the latest one
+    stream_id BIGINT NOT NULL
 );
 
-CREATE UNIQUE INDEX e2e_cross_signing_keys_idx ON e2e_cross_signing_keys(user_id, keytype, added_ts);
+CREATE UNIQUE INDEX e2e_cross_signing_keys_idx ON e2e_cross_signing_keys(user_id, keytype, stream_id);
 
 -- cross-signing signatures
 CREATE TABLE IF NOT EXISTS e2e_cross_signing_signatures (