diff options
author | Vika <vika@fireburn.ru> | 2023-07-21 17:43:01 +0300 |
---|---|---|
committer | Vika <vika@fireburn.ru> | 2023-07-21 17:43:01 +0300 |
commit | f34c2a2c95559bcb2d068abd611fff5cc677f159 (patch) | |
tree | 84aad5a16c950d9c1f55ac2252952b5e5bddb05a /kittybox-rs/migrations | |
parent | f13c60b70e1d9435b5f2803fc48c44eed7be761c (diff) | |
download | kittybox-f34c2a2c95559bcb2d068abd611fff5cc677f159.tar.zst |
Split Postgres schemas into two
Now the postgres schemas are completely independent of each other. This took a while to figure out!
Diffstat (limited to 'kittybox-rs/migrations')
-rw-r--r-- | kittybox-rs/migrations/webmention/0001_init.sql (renamed from kittybox-rs/migrations/0002_webmention_queue.sql) | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/kittybox-rs/migrations/0002_webmention_queue.sql b/kittybox-rs/migrations/webmention/0001_init.sql index 708933b..9e7a192 100644 --- a/kittybox-rs/migrations/0002_webmention_queue.sql +++ b/kittybox-rs/migrations/webmention/0001_init.sql @@ -1,4 +1,6 @@ -CREATE TABLE kittybox.incoming_webmention_queue ( +CREATE SCHEMA IF NOT EXISTS kittybox_webmention; + +CREATE TABLE kittybox_webmention.incoming_webmention_queue ( id UUID PRIMARY KEY DEFAULT gen_random_uuid(), source TEXT NOT NULL, target TEXT NOT NULL, @@ -6,8 +8,8 @@ CREATE TABLE kittybox.incoming_webmention_queue ( attempts INTEGER NOT NULL DEFAULT 0 ); -CREATE INDEX webmention_jobs_by_attempts ON kittybox.incoming_webmention_queue (attempts); +CREATE INDEX webmention_jobs_by_attempts ON kittybox_webmention.incoming_webmention_queue (attempts); CREATE RULE notify_incoming_webmention AS -ON INSERT TO kittybox.incoming_webmention_queue +ON INSERT TO kittybox_webmention.incoming_webmention_queue DO ALSO NOTIFY incoming_webmention; |