Skip to content

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

refactor: retire some unused fields (#3016)

Danny Xu36adc9c821f0
diff --git a/api/task.go b/api/task.go
index 90b3b4f66b..7cdf676a8c 100644
--- a/api/task.go
+++ b/api/task.go
@@ -216,7 +216,6 @@ type TaskCreate struct {
Labels string `jsonapi:"attr,labels"`
BackupID *int `jsonapi:"attr,backupId"`
VCSPushEvent *vcs.PushEvent
- MigrationType db.MigrationType `jsonapi:"attr,migrationType"`
}
// TaskFind is the API message for finding tasks.
diff --git a/server/issue.go b/server/issue.go
index 00172bb961..0632ce589f 100644
--- a/server/issue.go
+++ b/server/issue.go
@@ -888,7 +888,6 @@ func getUpdateTask(database *api.Database, vcsPushEvent *vcs.PushEvent, d *api.M
Type: taskType,
Statement: d.Statement,
EarliestAllowedTs: d.EarliestAllowedTs,
- MigrationType: d.MigrationType,
Payload: payloadString,
}, nil
}
@@ -1065,7 +1064,6 @@ func createGhostTaskList(database *api.Database, vcsPushEvent *vcs.PushEvent, de
Type: api.TaskDatabaseSchemaUpdateGhostSync,
Statement: detail.Statement,
EarliestAllowedTs: detail.EarliestAllowedTs,
- MigrationType: db.Migrate,
Payload: string(bytesSync),
})
diff --git a/tests/ghost_test.go b/tests/ghost_test.go
index 4038377a6d..c1dcc5566e 100644
--- a/tests/ghost_test.go
+++ b/tests/ghost_test.go
@@ -146,8 +146,9 @@ func TestGhostSchemaUpdate(t *testing.T) {
createContext, err := json.Marshal(&api.MigrationContext{
DetailList: []*api.MigrationDetail{
{
- DatabaseID: database.ID,
- Statement: mysqlMigrationStatement,
+ MigrationType: db.Migrate,
+ DatabaseID: database.ID,
+ Statement: mysqlMigrationStatement,
},
},
})