Skip to content

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

feat: taskrun run at (#16178)

p0ny4d28fbf92c2d
diff --git a/backend/migrator/migration/3.7/0000##taskrun_rollout_at.sql b/backend/migrator/migration/3.7/0000##taskrun_rollout_at.sql
new file mode 100644
index 0000000000..3775f1936d
--- /dev/null
+++ b/backend/migrator/migration/3.7/0000##taskrun_rollout_at.sql
@@ -0,0 +1 @@
+ALTER TABLE task_run ADD COLUMN run_at timestamptz;
\ No newline at end of file
diff --git a/backend/migrator/migration/LATEST.sql b/backend/migrator/migration/LATEST.sql
index bf1454cc1b..4a8e45e043 100644
--- a/backend/migrator/migration/LATEST.sql
+++ b/backend/migrator/migration/LATEST.sql
@@ -222,6 +222,7 @@ CREATE TABLE task_run (
attempt integer NOT NULL,
status text NOT NULL CHECK (status IN ('PENDING', 'RUNNING', 'DONE', 'FAILED', 'CANCELED')),
started_at timestamptz NULL,
+ run_at timestamptz,
code integer NOT NULL DEFAULT 0,
-- result saves the task run result in json format
result jsonb NOT NULL DEFAULT '{}'
diff --git a/backend/migrator/migrator_test.go b/backend/migrator/migrator_test.go
index f727b4944f..15a0eadc1c 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.6.6"), *files[len(files)-1].version)
+ require.Equal(t, semver.MustParse("3.7.0"), *files[len(files)-1].version)
}
func TestVersionUnique(t *testing.T) {