expired subscriptions and deleted topics with no subscribers are now removed from...
[websub-hub] / src / db / postgres / sql / subscription-delete-expired.sql
diff --git a/src/db/postgres/sql/subscription-delete-expired.sql b/src/db/postgres/sql/subscription-delete-expired.sql
new file mode 100644 (file)
index 0000000..d0f96e7
--- /dev/null
@@ -0,0 +1,4 @@
+--
+DELETE FROM subscription
+WHERE topic_id = $(topicId) AND expires < now()
+