Very sorry to post again on the same subject but the topic was closed too quick, the issue is not really solved. (Want to downgrade - #3 by hiousi)
I have this issue with last 7.1.4 and my co-workers have stopped their work since yesterday. They are unable to make any stock entry. Production is stopped for now (not in real, we are writting on papers all the material tranfers that will be typed when the issue will be fixed).
I just want to let the erpnext team solve the issue with the time they need, and in the meantime do not stop our work here. I’m unable to solve the issue by myself. So the only way I see is to reverse from 7.1.4 to 7.1.3.
@neilLasrado explained that downgrade can cause trouble.
When an update kill some necessary features, it breaks hundred of installations, why reverse upgrade is so difficult and risky? in that case, upgrade was the bad idea, downgrade is the only way I know to solve the issue immediately.
As far as I understand Git allow to go back from a commit. Will Bench permit downgrade? Should downgrade be a proposed feature?
To facilitate a downgrade, assuming you have a VM, take a snapshot (including memory) of the server before an upgrade. Then you can easily revert back if needed.
If ERPNext is business critical for you, you should have a staging server you can test upgrades and processes on before upgrading your main/production instance.
These are general best practices for any line-of-business application.
Staging server is great practice in software development. But it is only usefull if we can make tests. We are not developers, sure we can look around to check if the new one looks good, but it seems impossible to test the whole software at each update
Yes our erpnext run inside a VM. I use to make a snapshot before any upgrade. the point is that some work was done before hitting the issue.
can I do that:
backup the 7.1.4 database
restore the 7.1.3 VM snapshot
restore 7.1.4 database to the 7.1.3 VM (to retreive all work that was done since update)
is it the way to downgrade?
@hiousi
If you know what is your ERPNext version before upgrade, then you can easily install that version.
as @felix said, best way is to take backup/snapshot of server and then restore backup is anything is wrong.
AFAIK
You can not downgrade ERPNext, because when you do bench update code and database also get updated.
Patches are run to update database (erpnext/patches.txt at develop · frappe/erpnext · GitHub )
You need to write your own reverse patches and fix database if you want to downgrade, As there is no patches written to downgrade.
good ! @kolate_sambhaji your explanation is clear. I can undestand SQL queries and I see how I can reverse them. (or not reverse at all if they are not impacting).
@kolate_sambhaji downgraded yesterday to 7.1.3, was “easy”. did not touch the database (just pushed the 7.1.4 production database to it). the work has started again.
@neilLasrado going to copy the 7.1.4 install to a new testing instance, push the production database to it and bench update to 7.1.5. If the fix works I will do the same tonight with the current 7.1.3 production instance.