New migration state field and better state machine.
Currently, the migration state machine looks like this: http://
It has the following problems:
1. Currently, Migration.status is a string, and all the statuses are represented by pure strings. Please refer to [1]. But we should introduce a new field, maybe named "state" to represent more clear states because the field "status" has been exposed through API. We cannot simply change the "status" field.
2. This state machine mixed 3 state machines all together. It is not clear enough. We can split it, maybe.
3. Depending on the migration type works, the state machine may change a lot. About the migration type, please also refer to [2] and [3].
Will post a spec for more detail discussion.
[1] https:/
[2] https:/
[3] https:/