summary refs log tree commit diff
path: root/synapse/storage/schema
diff options
context:
space:
mode:
authorRichard van der Hoff <github@rvanderhoff.org.uk>2016-07-27 18:16:57 +0100
committerGitHub <noreply@github.com>2016-07-27 18:16:57 +0100
commit40e539683c65119400fa6487d7b8fd658b99eeae (patch)
treeea1dec0d3e43fdf90a2124bd6025a70710f629c6 /synapse/storage/schema
parentMerge pull request #957 from matrix-org/markjh/verify (diff)
parentkey upload tweaks (diff)
downloadsynapse-40e539683c65119400fa6487d7b8fd658b99eeae.tar.xz
Merge pull request #956 from matrix-org/rav/check_device_id_on_key_upload
Make the device id on e2e key upload optional
Diffstat (limited to 'synapse/storage/schema')
-rw-r--r--synapse/storage/schema/delta/33/devices_for_e2e_keys.sql19
1 files changed, 19 insertions, 0 deletions
diff --git a/synapse/storage/schema/delta/33/devices_for_e2e_keys.sql b/synapse/storage/schema/delta/33/devices_for_e2e_keys.sql
new file mode 100644
index 0000000000..140f2b63e0
--- /dev/null
+++ b/synapse/storage/schema/delta/33/devices_for_e2e_keys.sql
@@ -0,0 +1,19 @@
+/* Copyright 2016 OpenMarket Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+-- make sure that we have a device record for each set of E2E keys, so that the
+-- user can delete them if they like.
+INSERT INTO devices
+    SELECT user_id, device_id, 'unknown device' FROM e2e_device_keys_json;