Skip to content

Database governance built for humans and agents — controlling changes and access across every major database.

fix: semantic non-exist case (#14978)

Danny Xu14172018ebdf
diff --git a/backend/migrator/migration/prod/3.3/0004##default_semantic.sql b/backend/migrator/migration/prod/3.3/0004##default_semantic.sql
index c56eae33c7..54bff8a9a2 100644
--- a/backend/migrator/migration/prod/3.3/0004##default_semantic.sql
+++ b/backend/migrator/migration/prod/3.3/0004##default_semantic.sql
@@ -1,3 +1,7 @@
+INSERT INTO setting (creator_id, updater_id, name, value)
+VALUES (1, 1, 'bb.workspace.semantic-types', '{}')
+ON CONFLICT (name) DO NOTHING;
+
UPDATE setting
SET value = jsonb_build_object('types', '[{"id":"bb.default","title":"Default","description":"Default type with full masking"},{"id":"bb.default-partial","title":"Default Partial","description":"Default partial type with partial masking"}]'::jsonb || coalesce(value::jsonb->'types', '[]'::jsonb))
WHERE name = 'bb.workspace.semantic-types';
\ No newline at end of file