From 22279d181f24c5c2aa02e3c61acdc968521a66a2 Mon Sep 17 00:00:00 2001 From: Stan Runge Date: Mon, 26 Oct 2026 09:23:35 +0000 Subject: [PATCH] deploy preflight: ai schema now has 5 tables (setup tab) --- scripts/deploy-preflight.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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,