summary refs log tree commit diff
path: root/synapse/storage/schema
diff options
context:
space:
mode:
authorLuke Barnard <luke@matrix.org>2018-04-03 15:40:43 +0100
committerLuke Barnard <luke@matrix.org>2018-04-03 16:16:40 +0100
commiteb8d8d6f57c7f6017548aa95409bb8cc346a5ae0 (patch)
treeaa99b62a30badf0669b8e0ccae3960a9bdfd490e /synapse/storage/schema
parentThis should probably be a PUT (diff)
downloadsynapse-eb8d8d6f57c7f6017548aa95409bb8cc346a5ae0.tar.xz
Use join_policy API instead of joinable
The API is now under
 /groups/$group_id/setting/m.join_policy

and expects a JSON blob of the shape

```json
{
  "m.join_policy": {
    "type": "invite"
  }
}
```

where "invite" could alternatively be "open".
Diffstat (limited to 'synapse/storage/schema')
-rw-r--r--synapse/storage/schema/delta/48/groups_joinable.sql8
1 files changed, 7 insertions, 1 deletions
diff --git a/synapse/storage/schema/delta/48/groups_joinable.sql b/synapse/storage/schema/delta/48/groups_joinable.sql
index ace7d0a723..ab3b00286d 100644
--- a/synapse/storage/schema/delta/48/groups_joinable.sql
+++ b/synapse/storage/schema/delta/48/groups_joinable.sql
@@ -13,4 +13,10 @@
  * limitations under the License.
  */
 
-ALTER TABLE groups ADD COLUMN is_joinable SMALLINT DEFAULT 0 NOT NULL;
+/* 
+ * This isn't a real ENUM because sqlite doesn't support it
+ * and we use a default of NULL for inserted rows and interpret
+ * NULL at the python store level as necessary so that existing
+ * rows are given the correct default policy.
+ */
+ALTER TABLE groups ADD COLUMN join_policy TEXT DEFAULT NULL;