summaryrefslogtreecommitdiff
path: root/migrations
diff options
context:
space:
mode:
authorOwen Jacobson <owen@grimoire.ca>2024-09-04 12:13:54 -0400
committerOwen Jacobson <owen@grimoire.ca>2024-09-04 12:13:54 -0400
commitcae21da31ff795cc21ec19288fcdc5fdb8a713c7 (patch)
treec3ae1f5fdfc6ebd703a9387b1108671c003b7eaa /migrations
parent2c999920d8f6f0b320960b01721e1f29f4078755 (diff)
Allow any login to create channels.
Diffstat (limited to 'migrations')
-rw-r--r--migrations/20240904153315_channel.sql20
1 files changed, 20 insertions, 0 deletions
diff --git a/migrations/20240904153315_channel.sql b/migrations/20240904153315_channel.sql
new file mode 100644
index 0000000..e62b51f
--- /dev/null
+++ b/migrations/20240904153315_channel.sql
@@ -0,0 +1,20 @@
+create table channel (
+ id text
+ not null
+ primary key,
+ name text
+ not null
+ unique
+);
+
+create table channel_member (
+ channel text
+ not null
+ references channel,
+ login text
+ not null
+ references login,
+ primary key (channel, login)
+);
+
+create index channel_member_login on channel_member (login);