Skip to content

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

chore: move issue related dml scripts to 2.1.0 (#6043)

boojackdded1e6f1e4b
diff --git a/backend/migrator/migration/dev/20230509000000##drop_issue_pipeline_id_not_null.sql b/backend/migrator/migration/prod/2.1/0000##drop_issue_pipeline_id_not_null.sql
similarity index 100%
rename from backend/migrator/migration/dev/20230509000000##drop_issue_pipeline_id_not_null.sql
rename to backend/migrator/migration/prod/2.1/0000##drop_issue_pipeline_id_not_null.sql
diff --git a/backend/migrator/migration/dev/20230510000000##backfill_project_role.sql b/backend/migrator/migration/prod/2.1/0001##backfill_project_role.sql
similarity index 100%
rename from backend/migrator/migration/dev/20230510000000##backfill_project_role.sql
rename to backend/migrator/migration/prod/2.1/0001##backfill_project_role.sql
diff --git a/backend/migrator/migration/prod/LATEST.sql b/backend/migrator/migration/prod/LATEST.sql
index 01718ea904..ae1fd56b1d 100644
--- a/backend/migrator/migration/prod/LATEST.sql
+++ b/backend/migrator/migration/prod/LATEST.sql
@@ -677,7 +677,6 @@ EXECUTE FUNCTION trigger_update_updated_ts();
-- Pipeline related END
-----------------------
-- issue
--- Each issue links a pipeline driving the resolution.
CREATE TABLE issue (
id SERIAL PRIMARY KEY,
row_status row_status NOT NULL DEFAULT 'NORMAL',
@@ -686,7 +685,7 @@ CREATE TABLE issue (
updater_id INTEGER NOT NULL REFERENCES principal (id),
updated_ts BIGINT NOT NULL DEFAULT extract(epoch from now()),
project_id INTEGER NOT NULL REFERENCES project (id),
- pipeline_id INTEGER NOT NULL REFERENCES pipeline (id),
+ pipeline_id INTEGER REFERENCES pipeline (id),
name TEXT NOT NULL,
status TEXT NOT NULL CHECK (status IN ('OPEN', 'DONE', 'CANCELED')),
type TEXT NOT NULL CHECK (type LIKE 'bb.issue.%'),
diff --git a/backend/migrator/migrator_test.go b/backend/migrator/migrator_test.go
index 4c14c0038b..3ef6d01273 100644
--- a/backend/migrator/migrator_test.go
+++ b/backend/migrator/migrator_test.go
@@ -241,5 +241,5 @@ func TestMigrationCompatibility(t *testing.T) {
func TestGetCutoffVersion(t *testing.T) {
releaseVersion, err := getProdCutoffVersion()
require.NoError(t, err)
- require.Equal(t, semver.MustParse("2.0.2"), releaseVersion)
+ require.Equal(t, semver.MustParse("2.1.1"), releaseVersion)
}