Did recently the upgrade to 2024.8.2 and now my Recorder + Database do fail.
Errors:
psycopg2.errors.ForeignKeyViolation: insert or update on table "states" violates foreign key constraint "states_attributes_id_fkey"
DETAIL: Key (attributes_id)=(7996072) is not present in table "state_attributes".
and:
sqlalchemy.exc.IntegrityError: (psycopg2.errors.ForeignKeyViolation) insert or update on table "states" violates foreign key constraint "states_attributes_id_fkey"
DETAIL: Key (attributes_id)=(7996072) is not present in table "state_attributes".
[SQL: ALTER TABLE states ADD FOREIGN KEY(attributes_id) REFERENCES state_attributes (attributes_id)]
(Background on this error at: https://sqlalche.me/e/20/gkpj)
Is there anyway to fix/upgrade the database to most recent level?
Mine is indeed 12Gb large, however the error comes very quickly.
It’s a key which is expected to be available and missing. Happy on one side that this situation is not unique to my setup.