Database "nextcloud" has no actual collation version

Context
I recently had to migrate NC from another box. I was forced to manually migrate the DB from old Postgres v.13 to newer v.16 during that process - and manually copy a number of tables, while matching the schema. Everything had been working fine until I updated today.

Event:
I upgraded to from 28.0.3.2 to version 28.0.4.1 (the update identified itself as that in my config.php)

Problem:
NC is stuck on ‘update required’ despite the update having been run “successfully” (also from CLI)

The only error I can see repeated frequently in the logs is:

WARNING: database “nextcloud” has no actual collation version, but a version was recorded

Any suggestions? Perhaps I need to add something to the db to get this to continue?
Thanks in advance.

WARNING: database “nextcloud” has no actual collation version, but a version was recorded
I recently had to migrate NC from another box.

Maybe?

NC is stuck on ‘update required’ despite the update having been run “successfully” (also from CLI)

Did the Updater also trigger the occ upgrade / db migrations or did you tell it you’d run that last part yourself? It sounds like the Updater finished, but not the db migrations (which kind of make sense given the state of your db).

Thank you, unfortunately I ran into the same problem as the person in the post: “postgres invalid collation version change”

Instead I think I’ll use the occ tool to migrate to mysql, perhaps that’s just the better idea at this stage. If that fails, I’ll do it manually.

btw: I had triggered occ upgrade myself, it appeared to make no difference.

I changed the docker image to
image: postgres:16-bullseye

Then refreshed the collation and everything is working.

 REINDEX DATABASE <you_database_name>;

 ALTER DATABASE <your-database-name> REFRESH COLLATION VERSION;