| 1 | -- What a workspace's owners decide members may do in chat (src/settings.ts). |
| 2 | -- Every column has the default a workspace without a row gets, so |
| 3 | -- existing rows (made for `emoji_upload`) keep working unchanged. |
| 4 | |
| 5 | -- Who may create public channels, and private ones: every member, or only owners. |
| 6 | ALTER TABLE chat_settings ADD COLUMN public_channels TEXT NOT NULL DEFAULT 'members' CHECK (public_channels IN ('members', 'owners')); |
| 7 | ALTER TABLE chat_settings ADD COLUMN private_channels TEXT NOT NULL DEFAULT 'members' CHECK (private_channels IN ('members', 'owners')); |
| 8 | |
| 9 | -- Who may rename, archive and unarchive a channel: its owners and the |
| 10 | -- workspace's owners, or the workspace's owners only. |
| 11 | ALTER TABLE chat_settings ADD COLUMN manage_channels TEXT NOT NULL DEFAULT 'channel_owners' CHECK (manage_channels IN ('channel_owners', 'owners')); |
| 12 | |
| 13 | -- The public channels someone new is put in the first time they open |
| 14 | -- Chat, as a JSON array of channel ids. NULL: #general. |
| 15 | ALTER TABLE chat_settings ADD COLUMN default_channels TEXT; |