yuniql icon indicating copy to clipboard operation
yuniql copied to clipboard

Undo/rollback support

Open ioxFR opened this issue 3 years ago • 3 comments

Dear all,

I would like to use yuniql to promote data or schema changes to database. Rollback is manage by using transaction but i imagine a scenario when we want to come back to a n-1 version of our database. A kind of execute rollback script to undo last exec which is not possible at this time.

Any plan for this feature? Someone got any idea to manage that in a yuniql project until this feature coming?

Thanks in advance for your help Rgds, Valentin

ioxFR avatar Oct 20 '21 12:10 ioxFR

Hi @ioxFR,

Thanks for reaching out. At one point I thought of having yuniql undo feature. Yes, I agree that it can be cool feature particularly during dev/test phase of development. Some of my peers mentioned using this feature in code-first scenario in EF. However, after giving more thought on this, I find this incredibly complex feature and task to implement. So, this has been parked and likely won't make it in future releases.

Challenges such as handling IDENTITY can be pretty tough to deal with. Cases also where large lookup data is loaded and breaking schema changes are also tough nut. I admire those who managed to solve these cases! :)

HTH, Rodel

rdagumampan avatar Oct 23 '21 20:10 rdagumampan

Hi @rdagumampan

Thanks for you reply. Indeed i agree that it's BIG subject :) I think i will have look on that point to purpose solution maybe on that. I think to start, we can implement undo for supported only context to do able to manage some errors during undo. For exemple, starting with the constraint to be able to do the undo only for data insert/update for a defined maximum data size and later on we can enhance this feature to support maybe more cases with less constraints.

i will have look and let you know if i can contribute to purpose something for start.

Have nice day, Valentin

ioxFR avatar Oct 27 '21 12:10 ioxFR

@ioxFR really appreciate your interest and inputs. Just poke me or create a ticket so we can refine the scope of the feature before you make a PR. This way, I hope to be able to make leaner PR process as I think I've been lagging in reviewing the active PRs lately :/

rdagumampan avatar Nov 04 '21 07:11 rdagumampan