summary refs log tree commit diff
path: root/synapse/storage/schema
diff options
context:
space:
mode:
authorMark Haines <mark.haines@matrix.org>2015-04-15 16:58:35 +0100
committerMark Haines <mark.haines@matrix.org>2015-04-15 16:58:35 +0100
commita429515bdda30c600359f7e0012b5dc967edde3f (patch)
treeb991cc5a080833133560d68401963206830aff5e /synapse/storage/schema
parentFail quicker for 4xx responses in the key client, optional hit a different AP... (diff)
downloadsynapse-a429515bdda30c600359f7e0012b5dc967edde3f.tar.xz
Add methods for storing and retrieving the raw key json
Diffstat (limited to 'synapse/storage/schema')
-rw-r--r--synapse/storage/schema/delta/16/server_keys.sql6
1 files changed, 3 insertions, 3 deletions
diff --git a/synapse/storage/schema/delta/16/server_keys.sql b/synapse/storage/schema/delta/16/server_keys.sql
index d9b10d87f3..9cb589ff6d 100644
--- a/synapse/storage/schema/delta/16/server_keys.sql
+++ b/synapse/storage/schema/delta/16/server_keys.sql
@@ -13,12 +13,12 @@
  * limitations under the License.
  */
 
-CREATE TABLE IF NOT EXISTS server_keys (
+CREATE TABLE IF NOT EXISTS server_keys_json (
     server_name TEXT, -- Server name.
     key_id TEXT, -- Requested key id.
     from_server TEXT, -- Which server the keys were fetched from.
     ts_added_ms INTEGER, -- When the keys were fetched
-    ts_expires_ms INTEGER, -- When this version of the keys exipires.
+    ts_valid_until_ms INTEGER, -- When this version of the keys exipires.
     key_json BLOB, -- JSON certificate for the remote server.
-    CONSTRAINT uniqueness UNIQUE (server_name, key_id)
+    CONSTRAINT uniqueness UNIQUE (server_name, key_id, from_server)
 );