incubator-devlake
incubator-devlake copied to clipboard
[Feature][migration] data migration helper with rollback
Search before asking
- [X] I had searched in the issues and found no similar feature requirement.
Description
most of time,If we want to migration a table. we use the flow step.
- rename TABLE to TEMP (stop if error, define
deferto rename back on error) - create new TABLE (stop if error, define
deferto drop TABLE on error) - convert data from TEMP to TABLE (stop if error)
- drop TEMP.
It‘s better to create one helper function to do it.
Use case
No response
Related issues
No response
Are you willing to submit a PR?
- [X] Yes I am willing to submit a PR!
Code of Conduct
- [X] I agree to follow this project's Code of Conduct