I am creating a user, fetching a token, creating some acronyms, and deleting those acronyms. After which, I attempt to hard delete the user. However, this attempt fails with the following error:
[ ERROR ] PostgreSQLError.server.error.ri_ReportViolation: DELETE /api/users/A5FAE5EE-98D7-49CC-B9D9-FBAC85CC4962/force update or delete on table “User” violates foreign key constraint “fk:Token.userID+User.id” on table “Token” (ErrorMiddleware.swift:26)
[ DEBUG ] Possible causes for PostgreSQLError.server.error.ri_ReportViolation: Key (id)=(a5fae5ee-98d7-49cc-b9d9-fbac85cc4962) is still referenced from table “Token”. (ErrorMiddleware.swift:26)
I have tried deleting the user from the user’s account and the admin’s account, but receive the same errors. Am I missing something obvious?