diff --git a/scripts/deploy-preflight.ts b/scripts/deploy-preflight.ts index 9f04c9c..7c04ea2 100644 --- a/scripts/deploy-preflight.ts +++ b/scripts/deploy-preflight.ts @@ -188,8 +188,9 @@ try { if (Number(stats.tables) !== STATS_TABLES || Number(stats.app_rw) !== STATS_TABLES) throw new Error(`stats schema tables/grants are wrong: ${JSON.stringify(stats)}`); // Private-by-default AI tracker (news public in the app; bots and usage owner-only): app role - // read/write, personal_ro none. 3 = news_items, bot_status, usage_entries. - const AI_TABLES = 3; + // read/write, personal_ro none. 5 = news_items, bot_status, usage_entries, + // provider_setup_providers, provider_setup_entries (setup tab, owner-only). + const AI_TABLES = 5; const [ai] = await client` select count(*) filter (where has_table_privilege(c.oid, 'select, insert, update, delete')) as app_rw,