mirror of
https://github.com/jjbrunton/Sauci.git
synced 2026-10-31 18:19:43 +00:00
Align prod schema and deploy tooling
This commit is contained in:
1 parent
d2db86ec7f
commit
7e2e723880
105 files changed
+19014
-131
No files matched your search
@@ -4,13 +4,11 @@
|
||||
-- Add scheduling columns to question_packs
|
||||
ALTER TABLE question_packs
|
||||
ADD COLUMN IF NOT EXISTS scheduled_release_at TIMESTAMPTZ,
|
||||
ADD COLUMN IF NOT EXISTS release_notified BOOLEAN DEFAULT false;
|
||||
|
||||
ADD COLUMN IF NOT EXISTS release_notified BOOLEAN DEFAULT false;
|
||||
-- Index for efficient cron queries
|
||||
CREATE INDEX idx_question_packs_scheduled_release
|
||||
ON question_packs(scheduled_release_at)
|
||||
WHERE scheduled_release_at IS NOT NULL AND is_public = false;
|
||||
|
||||
WHERE scheduled_release_at IS NOT NULL AND is_public = false;
|
||||
-- Schedule cron job for processing scheduled releases (runs every 5 minutes)
|
||||
SELECT cron.schedule(
|
||||
'process-scheduled-releases',
|
||||
@@ -22,4 +20,4 @@ SELECT cron.schedule(
|
||||
body := '{}'::jsonb
|
||||
)
|
||||
$$
|
||||
);
|
||||
);
|
||||
Reference in new issue
Block a user