Error while bench migrate

I have frappe 5 setup and i’m trying to change from version 5 to 6. For that first i tried for update the bench using bench update command. After bench update I entered command bench update --upgrade then getting following error :

Migrating verve
Executing execute:frappe.reload_doc(‘core’, ‘doctype’, ‘docperm’) #2014-06-24 in verve (718adddf93)
Traceback (most recent call last):
File “/usr/lib/python2.7/runpy.py”, line 162, in _run_module_as_main
main”, fname, loader, pkg_name)
File “/usr/lib/python2.7/runpy.py”, line 72, in _run_code
exec code in run_globals
File “/home/priya/workspace/frappe_five/frappe-bench/apps/frappe/frappe/utils/bench_helper.py”, line 79, in
main()
File “/home/priya/workspace/frappe_five/frappe-bench/apps/frappe/frappe/utils/bench_helper.py”, line 16, in main
click.Group(commands=commands)(prog_name=‘bench’)
File “/home/priya/workspace/frappe_five/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 610, in call
return self.main(*args, **kwargs)
File “/home/priya/workspace/frappe_five/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 590, in main
rv = self.invoke(ctx)
File “/home/priya/workspace/frappe_five/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 936, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/home/priya/workspace/frappe_five/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 936, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/home/priya/workspace/frappe_five/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 782, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/home/priya/workspace/frappe_five/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 416, in invoke
return callback(*args, **kwargs)
File “/home/priya/workspace/frappe_five/frappe-bench/apps/frappe/frappe/commands.py”, line 29, in _func
ret = f(frappe._dict(ctx.obj), *args, **kwargs)
File “/home/priya/workspace/frappe_five/frappe-bench/apps/frappe/frappe/commands.py”, line 214, in migrate
frappe.modules.patch_handler.run_all()
File “/home/priya/workspace/frappe_five/frappe-bench/apps/frappe/frappe/modules/patch_handler.py”, line 25, in run_all
if not run_single(patchmodule = patch):
File “/home/priya/workspace/frappe_five/frappe-bench/apps/frappe/frappe/modules/patch_handler.py”, line 52, in run_single
return execute_patch(patchmodule, method, methodargs)
File “/home/priya/workspace/frappe_five/frappe-bench/apps/frappe/frappe/modules/patch_handler.py”, line 66, in execute_patch
exec patchmodule.split(“execute:”)[1] in globals()
File “”, line 1, in
File “/home/priya/workspace/frappe_five/frappe-bench/apps/frappe/frappe/init.py”, line 565, in reload_doc
return frappe.modules.reload_doc(module, dt, dn, force=force)
File “/home/priya/workspace/frappe_five/frappe-bench/apps/frappe/frappe/modules/init.py”, line 37, in reload_doc
return import_files(module, dt, dn, force=force)
File “/home/priya/workspace/frappe_five/frappe-bench/apps/frappe/frappe/modules/import_file.py”, line 17, in import_files
return import_file(module, dt, dn, force=force, pre_process=pre_process)
File “/home/priya/workspace/frappe_five/frappe-bench/apps/frappe/frappe/modules/import_file.py”, line 22, in import_file
ret = import_file_by_path(path, force, pre_process=pre_process)
File “/home/priya/workspace/frappe_five/frappe-bench/apps/frappe/frappe/modules/import_file.py”, line 54, in import_file_by_path
import_doc(doc, force=force, data_import=data_import, pre_process=pre_process)
File “/home/priya/workspace/frappe_five/frappe-bench/apps/frappe/frappe/modules/import_file.py”, line 114, in import_doc
frappe.delete_doc(doc.doctype, doc.name, force=1, ignore_doctypes=ignore, for_reload=True)
File “/home/priya/workspace/frappe_five/frappe-bench/apps/frappe/frappe/init.py”, line 544, in delete_doc
ignore_permissions, flags)
File “/home/priya/workspace/frappe_five/frappe-bench/apps/frappe/frappe/model/delete_doc.py”, line 37, in delete_doc
remove_all(doctype, name)
File “/home/priya/workspace/frappe_five/frappe-bench/apps/frappe/frappe/utils/file_manager.py”, line 208, in remove_all
attached_to_doctype=%s and attached_to_name=%s""", (dt, dn)):
File “/home/priya/workspace/frappe_five/frappe-bench/apps/frappe/frappe/database.py”, line 192, in sql_list
return [r[0] for r in self.sql(query, values, debug=debug)]
File “/home/priya/workspace/frappe_five/frappe-bench/apps/frappe/frappe/database.py”, line 135, in sql
self._cursor.execute(query, values)
File “/home/priya/workspace/frappe_five/frappe-bench/env/local/lib/python2.7/site-packages/MySQLdb/cursors.py”, line 205, in execute
self.errorhandler(self, exc, value)
File “/home/priya/workspace/frappe_five/frappe-bench/env/local/lib/python2.7/site-packages/MySQLdb/connections.py”, line 36, in defaulterrorhandler
raise errorclass, errorvalue
_mysql_exceptions.ProgrammingError: (1146, “Table ‘718adddf93.tabFile’ doesn’t exist”)

Check whether tabFile table exist in your database.
If not, run bench update --upgrade to update from v5 to v6.

@priya_s I have moved the position of the patch. Pull develop again and try.

Thanks @rmehta , Now it’s working