feat(analytics): resilient Graph API calls, CRON sync every 6h, polling frontend, engagement+views metrics

This commit is contained in:
Michael committed 2026-02-12 10:51:06 +01:00
1 parent 942e33df62
commit 330c42c6ff
5 files changed
+130 -55

No files matched your search

+5
View File
@@ -111,6 +111,11 @@ export async function migrate() {
ALTER TABLE "posts"
ADD COLUMN IF NOT EXISTS "generation_error" text;
`);
// page_analytics_history.page_engagement
await client.query(`
ALTER TABLE "page_analytics_history"
ADD COLUMN IF NOT EXISTS "page_engagement" integer DEFAULT 0;
`);
console.log("[Migration] Safe migration completed.");
} catch (error) {