FastAPI backend (SQLite + APScheduler), Vue 3 frontend, MCP server for Claude integration, and Docker Compose stack. Includes campaign data model (campaigns → variants → subs), post history, sub rules, and Playwright-based Reddit posting layer migrated from claude-bridge/reddit-poster. Also seeds legacy campaigns (6) and sub rules (14) from reddit-poster history. Closes #1 (scaffold), resolves migration from claude-bridge.
12 lines
504 B
SQL
12 lines
504 B
SQL
-- Campaign subs: which subreddits a campaign posts to, and in what order.
|
|
CREATE TABLE IF NOT EXISTS campaign_subs (
|
|
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
|
campaign_id INTEGER NOT NULL REFERENCES campaigns(id) ON DELETE CASCADE,
|
|
sub TEXT NOT NULL,
|
|
sort_order INTEGER NOT NULL DEFAULT 0,
|
|
active INTEGER NOT NULL DEFAULT 1,
|
|
|
|
UNIQUE(campaign_id, sub)
|
|
);
|
|
|
|
CREATE INDEX IF NOT EXISTS idx_campaign_subs_campaign ON campaign_subs(campaign_id);
|