Room entities are gone and errors in the log

I run HA with Supervisor and after a upgrade i get some errors in the logs and entities are not found for rooms. like light.roomname is missing.

I had this in the logs:
Setup failed for recorder: Integration failed to initialize.
Setup failed for logbook: Could not set up all dependencies.
Setup failed for history: Could not set up all dependencies.
Setup failed for default_config: Could not set up all dependencies.

7:36:43 PM – setup.py (ERROR) - message first occurred at 7:36:42 PM and shows up 3 times
Error during connection setup: (sqlite3.DatabaseError) database disk image is malformed [SQL: CREATE INDEX ix_states_old_state_id ON states (old_state_id)] (Background on this error at: Error Messages — SQLAlchemy 1.3 Documentation) (retrying in 3 seconds)
7:36:38 PM – recorder (ERROR) - message first occurred at 7:35:42 PM and shows up 10 times
Error executing query: (sqlite3.DatabaseError) database disk image is malformed [SQL: CREATE INDEX ix_states_old_state_id ON states (old_state_id)] (Background on this error at: Error Messages — SQLAlchemy 1.3 Documentation)
7:36:38 PM – recorder (ERROR) - message first occurred at 7:35:42 PM and shows up 10 times
Adding index ix_states_old_state_id to database. Note: this can take several minutes on large databases and slow computers. Please be patient!
7:36:38 PM – recorder (WARNING) - message first occurred at 7:35:42 PM and shows up 10 times
Database is about to upgrade. Schema version: 10
7:36:38 PM – recorder (WARNING) - message first occurred at 7:35:42 PM and shows up 10 times
Waiting on integrations to complete setup: recorder
7:36:09 PM – bootstrap.py (WARNING)

I tested with deleting the db and restarting HA as suggested here:

If i search for that sql error i can find some that switching to mysql(mariadb addon) would work so i tried that. The error messages are gone but i still cant see the entities.