Closed PrintINGU closed 2 months ago
@PrintINGU it looks like the version of code you are running is now no longer "in sync" with the state of the database.
Reverting the installation back to 0.15.x
does not "undo" the database changes made in 0.16.x
. It will be tricky (almost impossible) to thread the needle of adjusting the database to the correct state.
Do you have a database backup from during the update process? It should have been created automatically. I would suggest:
0.15.x
- the same version you were running before the updateI think the damage is probably way lower keeping on the newer version than trying to get the database migrations reversed somehow
Thank you for the anwers.
My colleague somehow managed to export the current database und imported it manually into the older Version. Right now it seems to work. I can't reproduce the error messages from before. Fingers crossed.
Deployment Method
Steps to Reproduce
Describe the problem*
Firstly I am not shure if this is a install problem or a bug. I'm sorry if I used the wrong tag.
Last week I wanted to upgrade the system as usual. Intended upgrade was from 0.15.7 to 0.15.8 but the system automaticly updated to 0.16.dev (I did not remember the exact wording, maybe it was 0.16dev or 0.16 dev) with the INVENTREE_TAG=stable. No errors and the system worked. But I wanted no development version in my production environment, so I reverted manualy to 0.15.8 (via INVENTREE_TAG=0.15.8 in .env file). But I got a lot of error messages while the database upgrade (
command: docker compose run --rm inventree-server invoke update
). Relevant log output at the end.Afterwards the system was usable and on the first look everything was okay. But after a few days of usage a lot of error messages apeared:
I tried to reinstall inventree on another container and import the userdata but the same error messages appeard. In the second try I reinstalled inventree and copied the userdata exept the pgdb folder and tried to migrate the database without success. Then I tried to migrate the Database with
invoke export-records -f data.json
but it also failed with the following error:/root/.local/lib/python3.11/site-packages/allauth/exceptions.py:9: UserWarning: allauth.exceptions is deprecated, use allauth.core.exceptions warnings.warn("allauth.exceptions is deprecated, use allauth.core.exceptions") CommandError: Unable to serialize database: relation "report_testreport" does not exist LINE 1: SELECT COUNT(*) AS "__count" FROM "report_testreport"
Than I noticed that 2 of 22 scheduled tasks failed: Last run of both failed tasks:
I think there is something wrong with the database but I don't know how to fix it.
My last resort would be to restore an old backup. But a lot of entrys in between would be lost.
Has somebody an idea how to fix this? Is it even a good idea to go back to older versions?
Steps to Reproduce
Relevant log output