Replies: 1 comment 5 replies
-
|
I understand. Hmm... not sure if we should provide users more possibility to test their scripts - I just do not want to make things more complicated. The only thing what concerns me, if you do not use a database that supports atomic DDL (like postgres), meaning where your DDL statements will be applied within a transaction (if you set autocommit=false), you will have to manually fix the database as soon as there is a problem anyway. I mean... what you could do as well for development is, after you added an evolution script and want to know if the down part works, you can just add a stupid statement - which has no effect at all - like |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Occasionally, I'd find myself writing an Evolutions script where the downscript isn't compatible with the upscript (or doesn't fully reverse the upscript).
When this happens and I happen to rollback the database schema change, it's convoluted to untangle it e.g. know where to modify the database.
In the development environment, I want this to be checked automatically before committing the database change (locally). And we can do that simply by applying upscript, downscript, and upscript again.
What are your thoughts?
FYI: for the real world scenario, we have this unit test to ensure that the Evolutions scripts are valid in both directions before merging:
Beta Was this translation helpful? Give feedback.
All reactions