Login ads: charge the daily fee only on days the ad was actually shown (last_shown_day); featured views counted

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
martbost
2026-09-15 05:26:16 -05:00
parent 7423347c95
commit 86a7f83874
3 changed files with 2 additions and 0 deletions
+1
View File
@@ -115,6 +115,7 @@ async function bootstrap() {
// solo message bodies are sanitized rich text; TEXT gives them room
await alterSafe('ALTER TABLE campaigns MODIFY body TEXT NULL');
await alterSafe('ALTER TABLE campaigns ADD COLUMN cta_label VARCHAR(40) NULL');
await alterSafe('ALTER TABLE campaigns ADD COLUMN last_shown_day VARCHAR(10) NULL'); // login ads: charge only days they were actually shown (2026-09-15)
await alterSafe('ALTER TABLE campaigns ADD COLUMN width INT NULL'); // banner size (IAB) → also NAS width
await alterSafe('ALTER TABLE campaigns ADD COLUMN height INT NULL'); // banner size (IAB) → also NAS height
await alterSafe('ALTER TABLE campaigns ADD COLUMN nas_ad_id INT NULL'); // syndicated NAS sponsorads.ID