Database governance built for humans and agents — controlling changes and access across every major database.
Go cicddata-governancedata-maskingdata-securitydatabase-accessdatabase-governancedevopsdevsecopsflywaygitopsliquibasemongodbmysqloraclepostgresqlschema-migrationssecuritysql-clientsqlservertidb
fix(schema): sync to prod (#5170)
p0nycd463f3def9f
diff --git a/backend/store/migration/dev/LATEST.sql b/backend/store/migration/dev/LATEST.sqlindex e15a001db8..59a33ee7c4 100644--- a/backend/store/migration/dev/LATEST.sql+++ b/backend/store/migration/dev/LATEST.sql@@ -1103,3 +1103,28 @@ BEFOREUPDATEON external_approval FOR EACH ROWEXECUTE FUNCTION trigger_update_updated_ts();+++-- risk stores the definition of a risk.+CREATE TABLE risk (+ id BIGSERIAL PRIMARY KEY,+ row_status row_status NOT NULL DEFAULT 'NORMAL',+ creator_id INTEGER NOT NULL REFERENCES principal (id),+ created_ts BIGINT NOT NULL DEFAULT extract(epoch from now()),+ updater_id INTEGER NOT NULL REFERENCES principal (id),+ updated_ts BIGINT NOT NULL DEFAULT extract(epoch from now()),+ source TEXT NOT NULL CHECK (source LIKE 'bb.risk.%'),+ -- how risky is the risk, the higher the riskier+ level BIGINT NOT NULL,+ name TEXT NOT NULL,+ active BOOLEAN NOT NULL,+ expression JSONB NOT NULL+);++ALTER SEQUENCE risk_id_seq RESTART WITH 101;++CREATE TRIGGER update_risk_updated_ts+BEFORE+UPDATE+ ON risk FOR EACH ROW+EXECUTE FUNCTION trigger_update_updated_ts();