Phase 1, part 2: Inbox, scheduled publishing and UTM tags
- Inbox: a top-level page, with a count in the menu, for everything waiting for approval; Content's drafts are reviewed there. /drafts redirects to it. - Scheduling: publish a draft now or at a time (migration 3 adds publish_at). A scheduler in the app publishes due drafts every 30 seconds. Posts more than 12 hours overdue, or refused before posting, go back to the Inbox with the reason. Content gets Scheduled and Published tabs. - UTM tags on links to the company's own websites and product pages, added when publishing; drafts stay untagged. - The container runs in the computer's time zone, so times are shown and read correctly. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -112,6 +112,12 @@ FROM posts p, (SELECT 'x' AS channel UNION ALL SELECT 'linkedin') c
|
||||
WHERE NOT EXISTS (SELECT 1 FROM json_each(p.posted_to) WHERE value = c.channel)
|
||||
ORDER BY p.generated_at, c.channel;
|
||||
DROP TABLE posts;
|
||||
`,
|
||||
// 3: scheduling. An approved draft is "scheduled" with the time it goes
|
||||
// out; "publish now" is a schedule for the present.
|
||||
`
|
||||
ALTER TABLE drafts ADD COLUMN publish_at TEXT;
|
||||
CREATE INDEX drafts_due ON drafts (status, publish_at);
|
||||
`,
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user