Theoretically, it shouldn't be any problem upgrading from one major version to another as long as the applications are optimized to support each other. However, if you have problems I would like to advise you to backup the data in version 12 and then perform the upgrade or install version 18 (if it's still available) and then use the import function to update the database. This is a safer way because in case it doesn't work, you still have the database backup and version 12 can be re-installed.