trilium icon indicating copy to clipboard operation
trilium copied to clipboard

(Bug report) - Update to docker latest issue with DB version

Open stanthewizzard opened this issue 1 year ago • 14 comments

Trilium Version

0.62 latest

What operating system are you using?

Other Linux

What is your setup?

Local (no sync)

Operating System Version

Photon Docker

Description

After updating to the latest version. Issue with DB version

Thanks for help

Error logs

Current DB version 228 is newer than the current DB version 227, which means that it was created by a newer and incompatible version of Trilium. Upgrade to the latest version of Trilium to resolve this issue.

stanthewizzard avatar Jan 22 '24 07:01 stanthewizzard

Can reproduce on version 0.62.6 in Docker container.

Daerendor avatar Jan 22 '24 09:01 Daerendor

Perhaps https://github.com/zadam/trilium/discussions/4596 ?

rom1dep avatar Jan 22 '24 09:01 rom1dep

Perhaps #4596 ?

Solved for me. My image was updated to 0.63-beta.

Daerendor avatar Jan 22 '24 10:01 Daerendor

Solved for me too. My image was updated to 0.63-beta.

stanthewizzard avatar Jan 22 '24 10:01 stanthewizzard

Same issue with the latest tag. Switching to 0.63-beta does fix it, but the latest tag exhibits the problem still.

skellyatsnhu avatar Jan 22 '24 13:01 skellyatsnhu

Same here but I use the 63.1-latest tag and now it works.

Vexz00 avatar Jan 22 '24 17:01 Vexz00

I used the following solution to temporarily solve the problem, but I'm not sure if new problems will occur.

# Stop the service from running
# Then modify the database version
sqlite3 document.db
UPDATE options SET value='227.0' WHERE name='dbVersion';

Great! Thank you. Simple solution is working for me. Open it in sqlite command line tool

.open document.db
UPDATE options SET value='227.0' WHERE name='dbVersion';
.save document.db
.exit

Heidieker avatar Jan 24 '24 08:01 Heidieker

@jan-bar @Heidieker : please don't do/recommend doing that: you are practically bypassing the mechanism which ensures that the application code remains in line with the data model. This is begging for trouble (features which got updated might break and you might even lose data). Moreover, when the application code will ultimately be updated, the migrations process will fail, and you will be left with an application refusing to start.

The solution is simple and was mentioned several times above: just point your image to the correct version.

rom1dep avatar Jan 24 '24 09:01 rom1dep

Avoid manually altering the version number. Manual adjustments could result in your data being migrated twice, leading to potential data errors.

Nriver avatar Jan 24 '24 09:01 Nriver

and you will be left with an application refusing to start.

Thats why i changed the version number, because the application did not start. Now its starting and i can save my notes.

Heidieker avatar Jan 24 '24 10:01 Heidieker

and you will be left with an application refusing to start.

Thats why i changed the version number, because the application did not start. Now its starting and i can save my notes.

And probably soon, it won't start, again (due to the migrations being attempted against a version the db is already at).

You are circumventing protections here, opening the door to unintended consequences. The point of my message was to make that crystal clear.

rom1dep avatar Jan 24 '24 11:01 rom1dep

Thank you

Heidieker avatar Jan 24 '24 12:01 Heidieker

Same here but I use the 63.1-latest tag and now it works.

Can confirm that this is the solution, this is probably what happened

  • latest pointed to 0.63 and the db got updated to version 228
  • 0.63.1 came out and got published as 63.1 by mistake, also latest now points to 0.62.6 which supports db version 227

the solution is to switch to this image until 0.63.1-latest gets republished and linked to latest (or 0.64 comes out)

services:
    trilium:
        # image: zadam/trilium:latest
        image: zadam/trilium:63.1-latest

LivingWithHippos avatar Jan 25 '24 14:01 LivingWithHippos

Can you please fix this ASAP. Cant access my notes anymore. Current DB version 228 is newer than the current DB version 227.

e-p-s avatar Feb 09 '24 07:02 e-p-s