provision
Lakebase cache-schema grant fix-up.
AppKit’s persistent cache (CacheManager -> PersistentStorage) uses a
schema appkit and a table appkit.appkit_cache_entries. When the connecting
Databricks identity lacks privileges on that schema, the cache migration
throws, and because AppKit is typically run with cache.strictPersistence: true, the cache is silently switched to a disabled in-memory stub - so every
persistent read (chart long-poll, history, etc.) misses and 404s.
This grants the connecting role full rights on the cache schema, but only when the schema ALREADY EXISTS - it never creates the schema itself. Run from a LOCAL identity that owns the schema (or holds grant option on it); it is skipped inside a Databricks App, where the app SP cannot grant and its Postgres role does not exist until its first connection.
Must run AFTER applyLakebaseToEnv has written the resolved connection
to process.env (so createLakebasePool picks up host / database / endpoint)
and BEFORE createApp initializes the cache.