verifications will not be processed until their topic is active
[websub-hub] / src / db / postgres / sql / schema / 1.0.1 / revert.sql
1 BEGIN;
2 CREATE OR REPLACE VIEW verification_needed AS
3 SELECT *
4 FROM verification
5 WHERE
6 (topic_id, callback, created) IN (SELECT topic_id, callback, max(created) AS created FROM verification GROUP BY topic_id, callback)
7 AND
8 (topic_id, callback) NOT IN (SELECT topic_id, callback FROM verification_in_progress_active)
9 AND
10 next_attempt <= now()
11 ;
12
13 DELETE FROM _meta_schema_version WHERE major = 1 AND minor = 0 AND patch = 1;
14 COMMIT;
15