Skip to content

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

chore: add deleted to plan table (#16903)

boojack51b5c3607295
diff --git a/backend/migrator/migration/3.9/0000##plan_deleted.sql b/backend/migrator/migration/3.9/0000##plan_deleted.sql
new file mode 100644
index 0000000000..91268cabc8
--- /dev/null
+++ b/backend/migrator/migration/3.9/0000##plan_deleted.sql
@@ -0,0 +1 @@
+ALTER TABLE plan ADD COLUMN deleted boolean NOT NULL DEFAULT FALSE;
diff --git a/backend/migrator/migration/LATEST.sql b/backend/migrator/migration/LATEST.sql
index ab034153b2..42be311665 100644
--- a/backend/migrator/migration/LATEST.sql
+++ b/backend/migrator/migration/LATEST.sql
@@ -239,6 +239,7 @@ ALTER SEQUENCE task_run_log_id_seq RESTART WITH 101;
-- Plan related BEGIN
CREATE TABLE plan (
id bigserial PRIMARY KEY,
+ deleted boolean NOT NULL DEFAULT FALSE,
creator_id integer NOT NULL REFERENCES principal(id),
created_at timestamptz NOT NULL DEFAULT now(),
updated_at timestamptz NOT NULL DEFAULT now(),
diff --git a/backend/migrator/migrator_test.go b/backend/migrator/migrator_test.go
index e080b1222f..91a4a9bd4f 100644
--- a/backend/migrator/migrator_test.go
+++ b/backend/migrator/migrator_test.go
@@ -12,7 +12,7 @@ import (
func TestLatestVersion(t *testing.T) {
files, err := getSortedVersionedFiles()
require.NoError(t, err)
- require.Equal(t, semver.MustParse("3.8.4"), *files[len(files)-1].version)
+ require.Equal(t, semver.MustParse("3.9.0"), *files[len(files)-1].version)
}
func TestVersionUnique(t *testing.T) {