Upgrade v5 error

getting error when upgrade to V5

frappe-bench$ bench switch-to-develop
Traceback (most recent call last):
File “/usr/local/bin/bench”, line 9, in
load_entry_point(‘bench==0.1’, ‘console_scripts’, ‘bench’)()
File “/home/erpnext/bench-repo/bench/cli.py”, line 55, in cli
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 664, in call
return self.main(*args, **kwargs)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 644, in main
rv = self.invoke(ctx)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 991, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 837, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 464, in invoke
return callback(*args, **kwargs)
File “/home/erpnext/bench-repo/bench/cli.py”, line 303, in _switch_to_develop
File “/home/erpnext/bench-repo/bench/app.py”, line 170, in switch_to_develop
switch_branch(‘develop’, apps=apps, bench=bench, upgrade=upgrade)
File “/home/erpnext/bench-repo/bench/app.py”, line 147, in switch_branch
raise MajorVersionUpgradeException(“Switching to {0} will cause upgrade from {1} to {2}”.format(branch, version_upgrade[0], version_upgrade[1]), version_upgrade[0], version_upgrade[1])
bench.app.MajorVersionUpgradeException: Switching to develop will cause upgrade from 4 to 5

bench switch-to-develop
bench migrate

above commands we can use for upgrade to v5 ??

Same error just after a fresh install. I did not change anything after the completion of sudo bash setup_frappe.sh --setup-production

v4 is still running well

You need to explicitly switch to version 5 by running those commands.