I have been working on a system which WAS on frappe/erpnext 8.0.66/8.0.48, and which crashed during an update. Using a bunch of completely not-recommended mangles, I managed to get the system to hobble along.
After several “bench update --reset” fails, I started commenting out the patches which fail to get past as many as possible. (Thanks to clarkej for teaching me about this part - even though I didn’t understand what he was talking about at the time)
sed -i “s/erpnext.patches.v8_0.move_account_head_/ERPNext.patches.v8_0.move_account_head_/” ~/frappe-bench/apps/erpnext/erpnext/patches.txt;
sed -i “s/erpnext.patches.v8_0.update_stock_qty_value_in_bom_item/ERPNext.patches.v8_0.update_stock_qty_value_in_bom_item/” ~/frappe-bench/apps/erpnext/erpnext/patches.txt;
sed -i “s/erpnext.patches.v8_7.make_subscription_from_recurring_data/ERPNext.patches.v8_7.make_subscription_from_recurring_data/” ~/frappe-bench/apps/erpnext/erpnext/patches.txt;
sed -i “s/erpnext.patches.v8_10.change_default_customer_credit_days/ERPNext.patches.v8_10.change_default_customer_credit_days/” ~/frappe-bench/apps/erpnext/erpnext/patches.txt;
sed -i “s/erpnext.patches.v9_1.create_issue_opportunity_type/ERPNext.patches.v9_1.create_issue_opportunity_type/” ~/frappe-bench/apps/erpnext/erpnext/patches.txt;
sed -i “s/erpnext.patches.v10_0.set_default_payment_terms/ERPNext.patches.v10_0.set_default_payment_terms/” ~/frappe-bench/apps/erpnext/erpnext/patches.txt;
The system is now on
ERPNext: v10.1.48 (master)
Frappe Framework: v10.1.16 (master)
and I have isolated the errors down to the following:
- Executing erpnext.patches.v8_0.move_account_head_from_account_to_warehouse_for_inventory
- pymysql.err.InternalError: (1054, u"Unknown column ‘warehouse’ in ‘where clause’")
- Executing erpnext.patches.v8_0.update_stock_qty_value_in_bom_item
- pymysql.err.InternalError: (1054, u"Unknown column ‘qty’ in ‘field list’")
- Executing erpnext.patches.v8_7.make_subscription_from_recurring_data
- pymysql.err.InternalError: (1054, u"Unknown column ‘end_date’ in ‘field list’")
- Executing erpnext.patches.v8_10.change_default_customer_credit_days
- pymysql.err.InternalError: (1054, u"Unknown column ‘credit_days’ in ‘field list’")
- Executing erpnext.patches.v9_1.create_issue_opportunity_type
- pymysql.err.InternalError: (1054, u"Unknown column ‘enquiry_type’ in ‘field list’")
- Executing erpnext.patches.v10_0.set_default_payment_terms_based_on_company
- pymysql.err.InternalError: (1054, u"Unknown column ‘credit_days’ in ‘field list’")
I don’t know why the frappe hasn’t gone to the latest v10.1.45?
It seems like the DB hasn’t migrated correctly, but when I compare the DDL in a mysql GUI app, they look the same.
bench update gives the following error:
Cannot proceed with update: You have local changes in app “erpnext” that are not committed.
Here are your choices:
1. Merge the erpnext app manually with “git pull” / “git pull --rebase” and fix conflicts.
1. Temporarily remove your changes with “git stash” or discard them completely
_ with “bench update --reset” or for individual repositries “git reset --hard”_
2. If your changes are helpful for others, send in a pull request via GitHub and
_ wait for them to be merged in the core._
bench update --reset
just recreates the patches.txt file, so it fails again on the same 6
bench --site site1.local migrate
works OK on all the “good” patches, ie. if the “bad” ones are commented out.
System is technically usable, but I’d like it to not need manual intervention if possible. Any pointers appreciated. (I don’t know enough about the correct usage of git, so maybe that’s what I need to learn??)
Thanks