Skip to content

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

requires policy.type start with "bb.policy" in the schema

天舟85170d6c0c37
diff --git a/store/migration/10001__init_schema.sql b/store/migration/10001__init_schema.sql
index 631fd846e9..e0319ec0cf 100644
--- a/store/migration/10001__init_schema.sql
+++ b/store/migration/10001__init_schema.sql
@@ -172,7 +172,7 @@ CREATE TABLE policy (
updater_id INTEGER NOT NULL REFERENCES principal (id),
updated_ts BIGINT NOT NULL DEFAULT (strftime('%s', 'now')),
environment_id INTEGER NOT NULL REFERENCES environment (id),
- type TEXT NOT NULL,
+ `type` TEXT NOT NULL CHECK (`type` LIKE 'bb.policy.%'),
payload TEXT NOT NULL
);