summaryrefslogtreecommitdiff
path: root/migrations
diff options
context:
space:
mode:
Diffstat (limited to 'migrations')
-rw-r--r--migrations/20241017005219_retain_deleted.sql23
1 files changed, 4 insertions, 19 deletions
diff --git a/migrations/20241017005219_retain_deleted.sql b/migrations/20241017005219_retain_deleted.sql
index 6205482..aed87f4 100644
--- a/migrations/20241017005219_retain_deleted.sql
+++ b/migrations/20241017005219_retain_deleted.sql
@@ -9,33 +9,18 @@ create table channel (
not null
primary key,
name text
- not null,
+ null
+ unique,
created_sequence bigint
unique
not null,
created_at text
- not null,
- unique (id, name)
+ not null
);
insert into channel (id, name, created_sequence, created_at)
select id, name, created_sequence, created_at from old_channel;
-create table channel_name_reservation (
- id text
- not null
- unique,
- name text
- not null
- unique,
- primary key (id, name),
- foreign key (id, name)
- references channel (id, name)
-);
-
-insert into channel_name_reservation (id, name)
-select id, name from old_channel;
-
create table channel_deleted (
id text
not null
@@ -64,7 +49,7 @@ create table message (
sent_at text
not null,
body text
- not null
+ null
);
insert into message (id, channel, sender, sent_sequence, sent_at, body)