You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to run the DELETE API under conversations:
getting the following foreign key reference error: raise translated_error from error sqlalchemy.exc.IntegrityError: (sqlalchemy.dialects.postgresql.asyncpg.IntegrityError) <class 'asyncpg.exceptions.ForeignKeyViolationError'>: update or delete on table "conversation" violates foreign key constraint "message_conversation_id_fkey" on table "message" DETAIL: Key (id)=(79d87f70-4829-41aa-9043-1b61e7888a74) is still referenced from table "message". [SQL: DELETE FROM conversation WHERE conversation.id = $1::UUID] [parameters: ('79d87f70-4829-41aa-9043-1b61e7888a74',)] (Background on this error at: https://sqlalche.me/e/20/gkpj
Any idea how to resolve this?
I have tried to add cascade ON DELETE but alembic migrations are not updating the tables:
Hello,
I'm trying to run the DELETE API under conversations:
getting the following foreign key reference error:
raise translated_error from error sqlalchemy.exc.IntegrityError: (sqlalchemy.dialects.postgresql.asyncpg.IntegrityError) <class 'asyncpg.exceptions.ForeignKeyViolationError'>: update or delete on table "conversation" violates foreign key constraint "message_conversation_id_fkey" on table "message" DETAIL: Key (id)=(79d87f70-4829-41aa-9043-1b61e7888a74) is still referenced from table "message". [SQL: DELETE FROM conversation WHERE conversation.id = $1::UUID] [parameters: ('79d87f70-4829-41aa-9043-1b61e7888a74',)] (Background on this error at: https://sqlalche.me/e/20/gkpj
Any idea how to resolve this?
I have tried to add cascade ON DELETE but alembic migrations are not updating the tables:
Any help would be appreciated.
The text was updated successfully, but these errors were encountered: