import ( "github.com/pingcap/tidb/model" ) // Create a new job task with some properties newJob := &model.Job{ Type: model.ActionAddForeignKey, StartTime: time.Now(), TableID: 10, State: model.JobStateNone, }
import ( "github.com/pingcap/tidb/model" ) // Create a new schema state for a table newSchema := &model.SchemaState{ DBName: "mydb", TableName: "mytable", ModifyColumnIds: []model.ColumnID{}, ModifyIdxIds: []model.IndexID{}, NeedHandleDDL: false, }Together, the `Job` and `SchemaState` structs provide tools for working with job tasks and schema changes in the TiDB database system.