diff options
Diffstat (limited to 'kittybox-rs/migrations/0002_webmention_queue.sql')
-rw-r--r-- | kittybox-rs/migrations/0002_webmention_queue.sql | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/kittybox-rs/migrations/0002_webmention_queue.sql b/kittybox-rs/migrations/0002_webmention_queue.sql new file mode 100644 index 0000000..0b95771 --- /dev/null +++ b/kittybox-rs/migrations/0002_webmention_queue.sql @@ -0,0 +1,10 @@ +CREATE TABLE incoming_webmention_queue ( + id UUID PRIMARY KEY DEFAULT gen_random_uuid(), + source TEXT NOT NULL, + target TEXT NOT NULL, + recv_timestamp TIMESTAMPTZ NOT NULL DEFAULT now() +); + +CREATE RULE notify_incoming_webmention AS +ON INSERT TO incoming_webmention_queue +DO ALSO NOTIFY incoming_webmention; |