From 9248410cf1ae5c505f6ad83bb8781bdf166b2db6 Mon Sep 17 00:00:00 2001 From: pyr0ball Date: Mon, 27 Apr 2026 10:43:05 -0700 Subject: [PATCH] feat: add comment config columns to campaign_subs (thread_title_pattern, thread_url_override, occurrence) --- .../016_campaign_subs_comment_config.sql | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 app/db/migrations/016_campaign_subs_comment_config.sql diff --git a/app/db/migrations/016_campaign_subs_comment_config.sql b/app/db/migrations/016_campaign_subs_comment_config.sql new file mode 100644 index 0000000..b13f58a --- /dev/null +++ b/app/db/migrations/016_campaign_subs_comment_config.sql @@ -0,0 +1,15 @@ +-- app/db/migrations/016_campaign_subs_comment_config.sql + +-- thread_title_pattern: case-insensitive substring to match the sticky thread title. +-- Required for reddit_comment campaigns; NULL for reddit_post campaigns. +ALTER TABLE campaign_subs ADD COLUMN thread_title_pattern TEXT; + +-- thread_url_override: skip thread detection and comment directly on this URL. +-- Takes precedence over thread_title_pattern when set. +ALTER TABLE campaign_subs ADD COLUMN thread_url_override TEXT; + +-- occurrence: scheduling modifier applied inside the job runner before execution. +-- "every" — fire on every scheduled run (default) +-- "first_sunday" — fire only on the first Sunday of the month +-- NULL — treated as "every" +ALTER TABLE campaign_subs ADD COLUMN occurrence TEXT;