summary refs log tree commit diff
diff options
context:
space:
mode:
authorNeil Johnson <neil@matrix.org>2018-11-13 10:07:03 +0000
committerNeil Johnson <neil@matrix.org>2018-11-13 10:07:03 +0000
commiteae8d4a3883ea2f6e89edfffbf258990524b9ca3 (patch)
treee7d0221dd153497c4e056ce8d9cc9245f7637d4d
parentmove to db backed support user (diff)
downloadsynapse-eae8d4a3883ea2f6e89edfffbf258990524b9ca3.tar.xz
add db support for support user
-rw-r--r--add_user_type_to_users.sql18
-rw-r--r--synapse/storage/schema/delta/53/add_user_type_to_users.sql20
2 files changed, 38 insertions, 0 deletions
diff --git a/add_user_type_to_users.sql b/add_user_type_to_users.sql
new file mode 100644
index 0000000000..eb8d9b19dc
--- /dev/null
+++ b/add_user_type_to_users.sql
@@ -0,0 +1,18 @@
+/* Copyright 2018 New Vector 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.
+ */
+ -- To allow for arbitrary account types in future, initially to be used to denote
+ -- designated support users
+
+ALTER TABLE users ADD COLUMN user_type TEXT DEFAULT NULL;
diff --git a/synapse/storage/schema/delta/53/add_user_type_to_users.sql b/synapse/storage/schema/delta/53/add_user_type_to_users.sql
new file mode 100644
index 0000000000..9044e0152c
--- /dev/null
+++ b/synapse/storage/schema/delta/53/add_user_type_to_users.sql
@@ -0,0 +1,20 @@
+/* Copyright 2018 New Vector 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.
+ */
+
+/* record whether we have sent a server notice about consenting to the
+ * privacy policy. Specifically records the version of the policy we sent
+ * a message about.
+ */
+ALTER TABLE users ADD COLUMN user_type TEXT DEFAULT NULL;