You should migrate within same version as described. Different application version have different database structure and switching versions without performing required upgrade steps will definitely result in issues at some point in time.
Normally you should always have the backup of a running Nextcloud version (data and database) and use this backup. If not open a second thread to solving the upgrade problem. Post details of your config, version, logs, …