Upgrading ERPNext Version 6-9

For those old users who need to do this and may have failed in the past, here’s a step by step that works.
Upgrade steps for anyone moving from an old version like 6 or 7

SO… head to the terminal and navigate to frappe-bench folder, prompt should look like
frappe@erpnext:~/frappe-bench$

install psutil if absent or fails…

sudo pip install psutil

remove nodejs, sudo apt-get remove nodejs

install nodejs v6 or v8, the newer the better
– install curl,
do… sudo apt-get install curl
if you have any errors or 404s, just type sudo apt-get update, this should update aptitude, then try installing curl again: sudo apt-get install curl
THEN…
curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
THEN
sudo apt-get install -y nodejs

bench update --reset or just bench update if you don’t have changes in the code
ASIDE – if you have some python errors and you have the developer bench-repo folder, navigate to bench-repo and do
git fetch THEN
git pull, if you made any modifications, do git stash. same with erpnext folder

You may have errors with new columns in doctype, add columns and proceed…
so… from frappe-bench do
bench mysql

THEN… these 2 were needed for my case… so…

ALTER TABLE tabDocType ADD COLUMN restrict_to_domain VARCHAR(40)
ALTER TABLE tabDocType ADD COLUMN in_dialog VARCHAR(40)
THEN optionally:
7. bench build
THEN
8. to patch up and upgrade, type: bench migrate,

skip any non-critical patches[not recommended, but I found no issues yet] skip carefully. patches in apps patches.txt files found in apps/frappe/frappe/patches.txt, similar location for erpnext patches. ** The skipping proved a necessary evil, because I realized this is the reason I never got any updates to work** thanks to @H_N for this insight. So edit document, save and enter bench migrate again, update will progress. use # at the beginning of a line to comment and skip

once done, you’re ready.

depends on your data, some patches will take a while, like some invoice and inventory patches such as adjusting valuation for negative inventory, took a while due to the sheer amount of negative inventory.

5 Likes

Backup your database before you start

1 Like

Sorry Sir… thanks for that crucial entry

SOME TESTING UPDATES

System spec: core i5, 2.3GHz (2 cores allocated to vm), SSD HD, 8gb RAM allocated to VM

Data Summary:

Database size: 1.19GB
Items: 25,562
Item Price: 40,145
Sales invoices: 188541, items in SINV: 438,908
Stock ledger entries: 461,704
GL Entries: 1,050,311
Items in the feed table: 374049

Performance estimates, will depend on number of items and posting time for any transaction:

Submitting Sales invoice: 3 seconds average, 8 to 15 on v6
Submitting old PRs and POs: 4 seconds average, 12+ on v6
submitting new PRS, POs: 2 seconds, 5 to 15 on v6 (depends on items)
Cancelling old Purchase Receipts, up to 1 week old or more: 21 seconds+ (still cool for such an intensive adjustment)
, very good AFAIK, any improvements needed team?

could you please append your new finding in the original first topic, so people can know the whole story. I’ll open it for you now.

ok thanks. done