FlushTabler migrate table and deletes all records from specified table
(dst schema.Tabler)
| 204 | |
| 205 | // FlushTabler migrate table and deletes all records from specified table |
| 206 | func (t *DataFlowTester) FlushTabler(dst schema.Tabler) { |
| 207 | // flush target table |
| 208 | err := t.Db.Migrator().DropTable(dst) |
| 209 | if err != nil { |
| 210 | panic(err) |
| 211 | } |
| 212 | err = t.Db.AutoMigrate(dst) |
| 213 | if err != nil { |
| 214 | panic(err) |
| 215 | } |
| 216 | } |
| 217 | |
| 218 | // Subtask executes specified subtasks |
| 219 | func (t *DataFlowTester) Subtask(subtaskMeta plugin.SubTaskMeta, taskData interface{}) { |