Skip to content

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

Improve mult-stage UI workflow test data to ease rollback feature testing

天舟cce18b17c4c1
diff --git a/store/seed/test/10110__task.sql b/store/seed/test/10110__task.sql
index d0580196cb..c64d24868c 100644
--- a/store/seed/test/10110__task.sql
+++ b/store/seed/test/10110__task.sql
@@ -453,7 +453,7 @@ VALUES
7006,
'Update testdb_integration',
'bb.task.database.schema.update',
- 'FAILED',
+ 'DONE',
'{"statement":"CREATE TABLE testdb_integration.tbl2 (name TEXT);", "rollbackStatement":"DROP TABLE testdb_integration.tbl2;"}'
);
@@ -484,7 +484,7 @@ VALUES
7010,
'Update testdb_staging',
'bb.task.database.schema.update',
- 'PENDING_APPROVAL',
+ 'FAILED',
'{"statement":"CREATE TABLE testdb_staging.tbl2 (name TEXT);", "rollbackStatement":"DROP TABLE testdb_staging.tbl2;"}'
);
diff --git a/store/seed/test/10120__task_run.sql b/store/seed/test/10120__task_run.sql
index 9879a0b923..5b7c28bce6 100644
--- a/store/seed/test/10120__task_run.sql
+++ b/store/seed/test/10120__task_run.sql
@@ -268,8 +268,36 @@ VALUES
1624879944,
11014,
'Update testdb_integration task run',
+ 'DONE',
+ 'bb.task.database.schema.update',
+ 'Applied migration version 20210830011437.11014 to database "testdb_integration"',
+ '{"statement":"CREATE TABLE testdb_integration.tbl2 (name TEXT)"}'
+ );
+
+-- Failed task run for task 10015 create table
+INSERT INTO
+ task_run (
+ creator_id,
+ created_ts,
+ updater_id,
+ updated_ts,
+ task_id,
+ name,
+ `status`,
+ `type`,
+ comment,
+ payload
+ )
+VALUES
+ (
+ 102,
+ 1624879944,
+ 102,
+ 1624879944,
+ 11015,
+ 'Update testdb_staging task run',
'FAILED',
'bb.task.database.schema.update',
'table "tbl2" already exists',
- '{"statement":"CREATE TABLE testdb_integration.tbl2 (name TEXT)"}'
+ '{"statement":"CREATE TABLE testdb_staging.tbl2 (name TEXT)"}'
);
\ No newline at end of file
diff --git a/store/seed/test/10140__activity.sql b/store/seed/test/10140__activity.sql
index 6afd38aa18..b32044086f 100644
--- a/store/seed/test/10140__activity.sql
+++ b/store/seed/test/10140__activity.sql
@@ -872,7 +872,7 @@ VALUES
'bb.pipeline.task.status.update',
'INFO',
'Applied migration version 20210830011437.11013 to database "testdb_dev"',
- '{"taskId":11015,"oldStatus":"RUNNING","newStatus":"DONE","issueName":"Create a new table ''tbl2'' using multi-stage SQL review workflow","taskName":"Update testdb_dev"}'
+ '{"taskId":11013,"oldStatus":"RUNNING","newStatus":"DONE","issueName":"Create a new table ''tbl2'' using multi-stage SQL review workflow","taskName":"Update testdb_dev"}'
);
INSERT INTO
@@ -897,7 +897,57 @@ VALUES
'bb.pipeline.task.status.update',
'INFO',
'',
- '{"taskId":11016,"oldStatus":"PENDING","newStatus":"RUNNING","issueName":"Create a new table ''tbl2'' using multi-stage SQL review workflow","taskName":"Update testdb_dev"}'
+ '{"taskId":11014,"oldStatus":"PENDING","newStatus":"RUNNING","issueName":"Create a new table ''tbl2'' using multi-stage SQL review workflow","taskName":"Update testdb_integration"}'
+ );
+
+INSERT INTO
+ activity (
+ creator_id,
+ created_ts,
+ updater_id,
+ updated_ts,
+ container_id,
+ `type`,
+ `level`,
+ COMMENT,
+ payload
+ )
+VALUES
+ (
+ 102,
+ 1624879944,
+ 102,
+ 1624879944,
+ 13009,
+ 'bb.pipeline.task.status.update',
+ 'INFO',
+ 'Applied migration version 20210830011437.11014 to database "testdb_integration"',
+ '{"taskId":11014,"oldStatus":"RUNNING","newStatus":"DONE","issueName":"Create a new table ''tbl2'' using multi-stage SQL review workflow","taskName":"Update testdb_integration"}'
+ );
+
+INSERT INTO
+ activity (
+ creator_id,
+ created_ts,
+ updater_id,
+ updated_ts,
+ container_id,
+ `type`,
+ `level`,
+ COMMENT,
+ payload
+ )
+VALUES
+ (
+ 102,
+ 1624879944,
+ 102,
+ 1624879944,
+ 13009,
+ 'bb.pipeline.task.status.update',
+ 'INFO',
+ '',
+ '{"taskId":11015,"oldStatus":"PENDING","newStatus":"RUNNING","issueName":"Create a new table ''tbl2'' using multi-stage SQL review workflow","taskName":"Update testdb_staging"}'
);
INSERT INTO
@@ -922,5 +972,5 @@ VALUES
'bb.pipeline.task.status.update',
'ERROR',
'table "tbl2" already exists',
- '{"taskId":11016,"oldStatus":"RUNNING","newStatus":"FAILED","issueName":"Create a new table ''tbl2'' using multi-stage SQL review workflow","taskName":"Update testdb_integration"}'
+ '{"taskId":11015,"oldStatus":"RUNNING","newStatus":"FAILED","issueName":"Create a new table ''tbl2'' using multi-stage SQL review workflow","taskName":"Update testdb_staging"}'
);
\ No newline at end of file