Database governance built for humans and agents — controlling changes and access across every major database.
Go cicddata-governancedata-maskingdata-securitydatabase-accessdatabase-governancedevopsdevsecopsflywaygitopsliquibasemongodbmysqloraclepostgresqlschema-migrationssecuritysql-clientsqlservertidb
feat(sql): release (#14911)
p0ny5d0837d1238e
diff --git a/backend/migrator/migration/prod/3.3/0000##release.sql b/backend/migrator/migration/prod/3.3/0000##release.sqlnew file mode 100644index 0000000000..eb2ce5f908--- /dev/null+++ b/backend/migrator/migration/prod/3.3/0000##release.sql@@ -0,0 +1,12 @@+CREATE TABLE IF NOT EXISTS release (+ id BIGSERIAL PRIMARY KEY,+ row_status row_status NOT NULL DEFAULT 'NORMAL',+ project_id INTEGER NOT NULL REFERENCES project (id),+ creator_id INTEGER NOT NULL REFERENCES principal (id),+ created_ts TIMESTAMPTZ NOT NULL DEFAULT now(),+ payload JSONB NOT NULL DEFAULT '{}'+);++ALTER SEQUENCE release_id_seq RESTART WITH 101;++CREATE INDEX idx_release_project_id ON release (project_id);diff --git a/backend/migrator/migration/prod/LATEST.sql b/backend/migrator/migration/prod/LATEST.sqlindex bf48f9da5a..4a9ebbe667 100644--- a/backend/migrator/migration/prod/LATEST.sql+++ b/backend/migrator/migration/prod/LATEST.sql@@ -1009,3 +1009,16 @@ CREATE TABLE changelog (ALTER SEQUENCE changelog_id_seq RESTART WITH 101;CREATE INDEX IF NOT EXISTS idx_changelog_database_id ON changelog (database_id);++CREATE TABLE IF NOT EXISTS release (+ id BIGSERIAL PRIMARY KEY,+ row_status row_status NOT NULL DEFAULT 'NORMAL',+ project_id INTEGER NOT NULL REFERENCES project (id),+ creator_id INTEGER NOT NULL REFERENCES principal (id),+ created_ts TIMESTAMPTZ NOT NULL DEFAULT now(),+ payload JSONB NOT NULL DEFAULT '{}'+);++ALTER SEQUENCE release_id_seq RESTART WITH 101;++CREATE INDEX idx_release_project_id ON release (project_id);diff --git a/backend/migrator/migrator_test.go b/backend/migrator/migrator_test.goindex 52b184d593..0a326a4b5e 100644--- a/backend/migrator/migrator_test.go+++ b/backend/migrator/migrator_test.go@@ -231,5 +231,5 @@ func TestMigrationCompatibility(t *testing.T) {func TestGetCutoffVersion(t *testing.T) {releaseVersion, err := getProdCutoffVersion()require.NoError(t, err)- require.Equal(t, semver.MustParse("3.2.9"), releaseVersion)+ require.Equal(t, semver.MustParse("3.3.0"), releaseVersion)}