I try to migrate locally (into docker dev env) from v12.22.0 to 13.6.0
bench init --skip-redis-config-generation --frappe-branch version-12 frappe-bench
bench new-site erpnext13.test --mariadb-root-password 123 --admin-password admin --no-mariadb-socket --db-name erpnext13
bench get-app --branch version-12 erpnext GitHub - frappe/erpnext: Free and Open Source Enterprise Resource Planning (ERP)
bench --site erpnext13.test install-app erpnext
bench get-app --branch master_fix erpnext_france GitHub - FHenry/erpnext_france: ERPNext Localization App
bench get-app --branch master customerapp url_customerapp
bench --site erpnext13.test set-config developer_mode 1
bench --site erpnext13.test install-app erpnext
bench --site erpnext13.test clear-cache
into my customerapp I have a fixtures Property Setters on Opportunty that change default value for Opportunity-sales_stage-default and Opportunity-opportunity_type-default
I import backup from my production site
bench --site erpnext13.test restore --mariadb-root-username root --mariadb-root-password 123 ./sites/erpnext13.test/private/backups/XXX.sql
bench start
From here it ok, I can go on local application in v12
bench switch-to-branch version-13 frappe erpnext --upgrade
bench setup requirements
bench migrate
I face a problem on Opportunity doctype migration
Migrating erpnext13.test
Executing erpnext.patches.v13_0.rename_issue_doctype_fields in erpnext13.test (erpnext13)
rename_field: first_response_time not found in Opportunity
Traceback (most recent call last):
File “/usr/lib/python3.7/runpy.py”, line 193, in _run_module_as_main
“main”, mod_spec)
File “/usr/lib/python3.7/runpy.py”, line 85, in _run_code
exec(code, run_globals)
File “/workspace/development/frappe-bench/apps/frappe/frappe/utils/bench_helper.py”, line 104, in
main()
File “/workspace/development/frappe-bench/apps/frappe/frappe/utils/bench_helper.py”, line 19, in main
click.Group(commands=commands)(prog_name=‘bench’)
File “/workspace/development/frappe-bench/env/lib/python3.7/site-packages/click/core.py”, line 829, in call
return self.main(*args, **kwargs)
File “/workspace/development/frappe-bench/env/lib/python3.7/site-packages/click/core.py”, line 782, in main
rv = self.invoke(ctx)
File “/workspace/development/frappe-bench/env/lib/python3.7/site-packages/click/core.py”, line 1259, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/workspace/development/frappe-bench/env/lib/python3.7/site-packages/click/core.py”, line 1259, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/workspace/development/frappe-bench/env/lib/python3.7/site-packages/click/core.py”, line 1066, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/workspace/development/frappe-bench/env/lib/python3.7/site-packages/click/core.py”, line 610, in invoke
return callback(*args, **kwargs)
File “/workspace/development/frappe-bench/env/lib/python3.7/site-packages/click/decorators.py”, line 21, in new_func
return f(get_current_context(), *args, **kwargs)
File “/workspace/development/frappe-bench/apps/frappe/frappe/commands/init.py”, line 27, in _func
ret = f(frappe._dict(ctx.obj), *args, **kwargs)
File “/workspace/development/frappe-bench/apps/frappe/frappe/commands/site.py”, line 309, in migrate
skip_search_index=skip_search_index
File “/workspace/development/frappe-bench/apps/frappe/frappe/migrate.py”, line 67, in migrate
frappe.modules.patch_handler.run_all(skip_failing)
File “/workspace/development/frappe-bench/apps/frappe/frappe/modules/patch_handler.py”, line 41, in run_all
run_patch(patch)
File “/workspace/development/frappe-bench/apps/frappe/frappe/modules/patch_handler.py”, line 30, in run_patch
if not run_single(patchmodule = patch):
File “/workspace/development/frappe-bench/apps/frappe/frappe/modules/patch_handler.py”, line 71, in run_single
return execute_patch(patchmodule, method, methodargs)
File “/workspace/development/frappe-bench/apps/frappe/frappe/modules/patch_handler.py”, line 91, in execute_patch
frappe.get_attr(patchmodule.split()[0] + “.execute”)()
File “/workspace/development/frappe-bench/apps/erpnext/erpnext/patches/v13_0/rename_issue_doctype_fields.py”, line 47, in execute
frappe.db.set_value(‘Opportunity’, entry.name, ‘first_response_time’, mins_to_first_response, update_modified=False)
File “/workspace/development/frappe-bench/apps/frappe/frappe/database/database.py”, line 667, in set_value
values, debug=debug)
File “/workspace/development/frappe-bench/apps/frappe/frappe/database/database.py”, line 146, in sql
self._cursor.execute(query, values)
File “/workspace/development/frappe-bench/env/lib/python3.7/site-packages/pymysql/cursors.py”, line 148, in execute
result = self._query(query)
File “/workspace/development/frappe-bench/env/lib/python3.7/site-packages/pymysql/cursors.py”, line 310, in _query
conn.query(q)
File “/workspace/development/frappe-bench/env/lib/python3.7/site-packages/pymysql/connections.py”, line 548, in query
self._affected_rows = self._read_query_result(unbuffered=unbuffered)
File “/workspace/development/frappe-bench/env/lib/python3.7/site-packages/pymysql/connections.py”, line 775, in _read_query_result
result.read()
File “/workspace/development/frappe-bench/env/lib/python3.7/site-packages/pymysql/connections.py”, line 1156, in read
first_packet = self.connection._read_packet()
File “/workspace/development/frappe-bench/env/lib/python3.7/site-packages/pymysql/connections.py”, line 725, in _read_packet
packet.raise_for_error()
File “/workspace/development/frappe-bench/env/lib/python3.7/site-packages/pymysql/protocol.py”, line 221, in raise_for_error
err.raise_mysql_exception(self._data)
File “/workspace/development/frappe-bench/env/lib/python3.7/site-packages/pymysql/err.py”, line 143, in raise_mysql_exception
raise errorclass(errno, errval)
pymysql.err.OperationalError: (1054, “Unknown column ‘first_response_time’ in ‘field list’”)
If I check tabOpportunity the field mins_to_first_response is still here and not replace by first_response_time as it should be done by frappe.reload_doc(‘crm’, ‘doctype’, ‘opportunity’) in
erpnext/patches/v13_0/rename_issue_doctype_fields.py
And into tabDocField table there is also still mins_to_first_response instead of first_response_time
If anyone have a clue ?