sqitch rework: revert to previous version (same hash) violates constraint #750
Replies: 4 comments
-
If you change it to be identical to the previous version, nothing is being reworked. The way to do it is to delete the reworked change. Unless you have some reason to keep it (e.g., already released?). In which case either rework it again to change it back, or put a wayward space in the reworked deploy script so that the SHA hash ID turns out different. |
Beta Was this translation helpful? Give feedback.
-
I created a small test case to demonstrate, sqitch-rework-test.zip. It consists of a single change, func1. So I did the following:
Now it gets the error (see below). Is this intended behavior? If so, I'll do the white space thing and get on with my life :-).
|
Beta Was this translation helpful? Give feedback.
-
it is intended behavior. Stick an extra space or new line in the |
Beta Was this translation helpful? Give feedback.
-
Great, thanks! |
Beta Was this translation helpful? Give feedback.
-
After doing a sqitch rework and modifying a routine to match its previous version, on deploy I get
ERROR: duplicate key value violates unique constraint "changes_project_script_hash_key"
Is there a way to revert to a previous version of code or am I stuck with having to change some white space or a comment?
Beta Was this translation helpful? Give feedback.
All reactions