Skip to content

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

fix: plan_id type (#7242)

p0ny0900b73eeb29
diff --git a/backend/migrator/migration/dev/LATEST.sql b/backend/migrator/migration/dev/LATEST.sql
index 58545bf9ef..00fdfb3e40 100644
--- a/backend/migrator/migration/dev/LATEST.sql
+++ b/backend/migrator/migration/dev/LATEST.sql
@@ -719,7 +719,7 @@ CREATE TABLE plan_check_run (
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()),
- plan_id INTEGER NOT NULL REFERENCES plan (id),
+ plan_id BIGINT NOT NULL REFERENCES plan (id),
status TEXT NOT NULL CHECK (status IN ('RUNNING', 'DONE', 'FAILED', 'CANCELED')),
type TEXT NOT NULL CHECK (type LIKE 'bb.plan-check.%'),
config JSONB NOT NULL DEFAULT '{}',
diff --git a/backend/migrator/migration/prod/2.5/0002##plan_check_run.sql b/backend/migrator/migration/prod/2.5/0002##plan_check_run.sql
index 02e6bc12e6..891ad65a6b 100644
--- a/backend/migrator/migration/prod/2.5/0002##plan_check_run.sql
+++ b/backend/migrator/migration/prod/2.5/0002##plan_check_run.sql
@@ -4,7 +4,7 @@ CREATE TABLE plan_check_run (
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()),
- plan_id INTEGER NOT NULL REFERENCES plan (id),
+ plan_id BIGINT NOT NULL REFERENCES plan (id),
status TEXT NOT NULL CHECK (status IN ('RUNNING', 'DONE', 'FAILED', 'CANCELED')),
type TEXT NOT NULL CHECK (type LIKE 'bb.plan-check.%'),
config JSONB NOT NULL DEFAULT '{}',
diff --git a/backend/migrator/migration/prod/LATEST.sql b/backend/migrator/migration/prod/LATEST.sql
index b217cffa56..34ced34377 100644
--- a/backend/migrator/migration/prod/LATEST.sql
+++ b/backend/migrator/migration/prod/LATEST.sql
@@ -718,7 +718,7 @@ CREATE TABLE plan_check_run (
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()),
- plan_id INTEGER NOT NULL REFERENCES plan (id),
+ plan_id BIGINT NOT NULL REFERENCES plan (id),
status TEXT NOT NULL CHECK (status IN ('RUNNING', 'DONE', 'FAILED', 'CANCELED')),
type TEXT NOT NULL CHECK (type LIKE 'bb.plan-check.%'),
config JSONB NOT NULL DEFAULT '{}',