Refresh HiveGrid Cloud reference snapshot

This commit is contained in:
david committed 2026-08-03 15:31:14 +02:00
1 parent 5e99e14772
commit 7f88026f79
5955 files changed
+1177325 -188362

No files matched your search

@@ -1,7 +1,7 @@
-- R-P11a Global Search isolation artifact.
-- R-P11a Global Search isolation rollout artifact.
-- Companion to prisma/rls/tenant-isolation.sql. These tables are tenant-scoped
-- metadata around Meilisearch documents and recent searches. Enable during the
-- merge migration once the schema lands.
-- metadata around Meilisearch documents and recent searches. Activate only once
-- every runtime access uses withTenantRLS() and therefore sets app.tenant_id.
--
-- Verification:
-- psql "$DIRECT_URL" -f prisma/rls/search-isolation.sql
@@ -11,13 +11,24 @@ ALTER TABLE "SearchIndexEntry" FORCE ROW LEVEL SECURITY;
DROP POLICY IF EXISTS "tenant_isolation_search_index_entry" ON "SearchIndexEntry";
CREATE POLICY "tenant_isolation_search_index_entry" ON "SearchIndexEntry"
USING ("tenantId" = current_setting('app.current_tenant_id', true))
WITH CHECK ("tenantId" = current_setting('app.current_tenant_id', true));
USING ("tenantId" = current_setting('app.tenant_id', true))
WITH CHECK ("tenantId" = current_setting('app.tenant_id', true));
ALTER TABLE "RecentSearch" ENABLE ROW LEVEL SECURITY;
ALTER TABLE "RecentSearch" FORCE ROW LEVEL SECURITY;
DROP POLICY IF EXISTS "tenant_isolation_recent_search" ON "RecentSearch";
CREATE POLICY "tenant_isolation_recent_search" ON "RecentSearch"
USING ("tenantId" = current_setting('app.current_tenant_id', true))
WITH CHECK ("tenantId" = current_setting('app.current_tenant_id', true));
USING ("tenantId" = current_setting('app.tenant_id', true))
WITH CHECK ("tenantId" = current_setting('app.tenant_id', true));
GRANT SELECT, INSERT, UPDATE, DELETE ON "SearchIndexEntry", "RecentSearch" TO hivegrid_app;
-- Inverse SQL (coordinated rollback):
-- REVOKE SELECT, INSERT, UPDATE, DELETE ON "SearchIndexEntry", "RecentSearch" FROM hivegrid_app;
-- DROP POLICY IF EXISTS "tenant_isolation_search_index_entry" ON "SearchIndexEntry";
-- ALTER TABLE "SearchIndexEntry" NO FORCE ROW LEVEL SECURITY;
-- ALTER TABLE "SearchIndexEntry" DISABLE ROW LEVEL SECURITY;
-- DROP POLICY IF EXISTS "tenant_isolation_recent_search" ON "RecentSearch";
-- ALTER TABLE "RecentSearch" NO FORCE ROW LEVEL SECURITY;
-- ALTER TABLE "RecentSearch" DISABLE ROW LEVEL SECURITY;