Have a rollback feature #154
engahmeds3ed
started this conversation in
Ideas
Replies: 2 comments
|
Yes, I think you are correct.
|
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Hey,
I was thinking about this matter from some time and wanted to share my thoughts with you here so we can discuss and reach the best solution that we may collaborate together to get it out in awesome way to all users.
Current Behavior
We have upgrades property in the table class and to make rollback, we need to add new item in this array to make query(s) to revert what was done on the previous ones and also change the table version number.
Proposed Behavior
What if we changed the table version to older version and in the code we check if the version in the code is less than the version in the database so we need to call the methods in the upgrades property but pass "down" to it otherwise pass "up" so in the migration method code we can run a query with upgrade and run another query on revert.
What do u think?
All reactions