Database governance built for humans and agents — controlling changes and access across every major database.
Go cicddata-governancedata-maskingdata-securitydatabase-accessdatabase-governancedevopsdevsecopsflywaygitopsliquibasemongodbmysqloraclepostgresqlschema-migrationssecuritysql-clientsqlservertidb
chore: drop task status (#15439)
p0nyc9bf24a4e823
diff --git a/backend/metric/metric.go b/backend/metric/metric.goindex 5ff5461481..a097f6c97d 100644--- a/backend/metric/metric.go+++ b/backend/metric/metric.go@@ -28,8 +28,6 @@ const (PrincipalLoginMetricName metric.Name = "bb.principal.login"// IssueCreateMetricName is the metric name for issue creation event.IssueCreateMetricName metric.Name = "bb.issue.create"- // TaskStatusMetricName is the metric name for task status update event.- TaskStatusMetricName metric.Name = "bb.task.status"// SQLEditorExecutionMetricName is the metric name for SQL Editor execution event.SQLEditorExecutionMetricName metric.Name = "bb.sql-editor.execute"// PrincipalCreateMetricName is the metric name for principal creation event.diff --git a/backend/migrator/migration/3.5/0010##drop_task_status.sql b/backend/migrator/migration/3.5/0010##drop_task_status.sqlnew file mode 100644index 0000000000..9c2f267d04--- /dev/null+++ b/backend/migrator/migration/3.5/0010##drop_task_status.sql@@ -0,0 +1 @@+ALTER TABLE task DROP COLUMN IF EXISTS status;diff --git a/backend/migrator/migration/LATEST.sql b/backend/migrator/migration/LATEST.sqlindex a7ec5c2dfd..7533e5bd50 100644--- a/backend/migrator/migration/LATEST.sql+++ b/backend/migrator/migration/LATEST.sql@@ -219,7 +219,6 @@ CREATE TABLE task (instance text NOT NULL REFERENCES instance(resource_id),db_name text,name text NOT NULL,- status text NOT NULL CHECK (status IN ('PENDING', 'PENDING_APPROVAL', 'RUNNING', 'DONE', 'FAILED', 'CANCELED')),type text NOT NULL CHECK (type LIKE 'bb.task.%'),payload jsonb NOT NULL DEFAULT '{}',earliest_allowed_at timestamptz NULL@@ -227,8 +226,6 @@ CREATE TABLE task (CREATE INDEX idx_task_pipeline_id_stage_id ON task(pipeline_id, stage_id);-CREATE INDEX idx_task_status ON task(status);-ALTER SEQUENCE task_id_seq RESTART WITH 101;-- task run table stores the task rundiff --git a/backend/migrator/migrator_test.go b/backend/migrator/migrator_test.goindex 29e36a99fc..6e0cca4e71 100644--- a/backend/migrator/migrator_test.go+++ b/backend/migrator/migrator_test.go@@ -212,5 +212,5 @@ func TestMigrationCompatibility(t *testing.T) {func TestGetCutoffVersion(t *testing.T) {releaseVersion, err := getProdCutoffVersion()require.NoError(t, err)- require.Equal(t, semver.MustParse("3.5.9"), releaseVersion)+ require.Equal(t, semver.MustParse("3.5.10"), releaseVersion)}diff --git a/backend/store/task.go b/backend/store/task.goindex 3a9b8dd9e4..cff1d31d95 100644--- a/backend/store/task.go+++ b/backend/store/task.go@@ -151,7 +151,6 @@ func (*Store) createTasks(ctx context.Context, tx *Tx, creates ...*TaskMessage)instance,db_name,name,- status,type,payload,earliest_allowed_at@@ -161,7 +160,6 @@ func (*Store) createTasks(ctx context.Context, tx *Tx, creates ...*TaskMessage)unnest(CAST($3 AS TEXT[])),unnest(CAST($4 AS TEXT[])),unnest(CAST($5 AS TEXT[])),- 'PENDING_APPROVAL',unnest(CAST($6 AS TEXT[])),unnest(CAST($7 AS JSONB[])),unnest(CAST($8 AS TIMESTAMPTZ[]))