From eae8d4a3883ea2f6e89edfffbf258990524b9ca3 Mon Sep 17 00:00:00 2001 From: Neil Johnson Date: Tue, 13 Nov 2018 10:07:03 +0000 Subject: [PATCH] add db support for support user --- add_user_type_to_users.sql | 18 +++++++++++++++++ .../delta/53/add_user_type_to_users.sql | 20 +++++++++++++++++++ 2 files changed, 38 insertions(+) create mode 100644 add_user_type_to_users.sql create mode 100644 synapse/storage/schema/delta/53/add_user_type_to_users.sql 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;