summaryrefslogtreecommitdiff
path: root/migrations
diff options
context:
space:
mode:
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);