Exception occurred while executing a query: Datatype mismatch: column "readonly" is of type boolean but expression is of type integer

I get the following error after running an apt update/upgrade and don’t know how to proceed. Hopefully someone can help, as I cannot open documents in the browser anymore.
Opening Documents in the browser are stuck in the state “loading” and the error shows up:
Error
App: Index
Decription: Doctrine\DBAL\Exception\DriverException: An exception occurred while executing a query: SQLSTATE[42804]: Datatype mismatch: 7 ERROR: column “readonly” is of type boolean but expression is of type integer LINE 1: …donly", “user_index”) VALUES($1, $2, $3, $4, $5, $6, $7, $8) ^ HINT: You will need to rewrite or cast the expression.

NC 21.0.1
PHP 7.4.18
PSQL 11.11

in paprallel I got the following and not sure whether this fits together:
Error
App: document server
Description: Doctrine\DBAL\Exception\DriverException: An exception occurred while executing a query: SQLSTATE[42883]: Undefined function: 7 ERROR: operator does not exist: boolean = integer LINE 1: …ges" WHERE (“document_id” = $1) AND (“processing” = $2) ORDE… ^ HINT: No operator matches the given name and argument types. You might need to add explicit type casts.