/
githubmirror
/
tldraw
Обзор
Документация
Войти
/
githubmirror
/
tldraw
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
apps/dotcom/zero-cache/migrations/032_enable_ddl_detection.sql
11 строк
515 B
Mitja Bezenšek
fix(dotcom): notify Zero of schema changes to avoid full resets on Supabase (#9033)
09 июн 2026, 14:59
Не верифицирован
09 июн 2026, 14:59
5c709ed
Код
Авторство
О чём код?
-- Enable Zero's manual DDL detection so it trusts the migration runner's -- update_schemas() calls instead of event triggers (Supabase doesn't fire them -- for ALTER PUBLICATION). Guarded because zero_0 doesn't exist until Zero boots, -- which happens after migrations on a fresh database. -- https://zero.rocicorp.dev/docs/connecting-to-postgres#schema-change-hooks DO $$ BEGIN IF to_regclass('zero_0."shardConfig"') IS NOT NULL THEN UPDATE zero_0."shardConfig" SET "ddlDetection" = true; END IF; END $$;