discord-tickets / bot

The most popular open-source and self-hosted ticket management bot for Discord - a free alternative to the premium and white-label plans of other popular ticketing bots.
https://discordtickets.app
GNU General Public License v3.0
898 stars 473 forks source link

[BUG] Foreign key constraint failed on the field: `ticketId` #453

Open Netherwhal opened 1 year ago

Netherwhal commented 1 year ago

Is there an existing issue for this?

Current Behavior

Foreign key constraint failed on the field: `ticketId`
 01/07/23 22:22:06  [WARN] Failed to archive message 1124827295849394327
 01/07/23 22:22:06  [ERROR] PrismaClientKnownRequestError: 
Invalid `prisma.archivedUser.upsert()` invocation:

Foreign key constraint failed on the field: `ticketId`
    at Rn.handleRequestError (/home/container/node_modules/.pnpm/@prisma+client@4.16.1_prisma@4.16.1/node_modules/@prisma/client/runtime/library.js:174:7325)
    at Rn.handleAndLogRequestError (/home/container/node_modules/.pnpm/@prisma+client@4.16.1_prisma@4.16.1/node_modules/@prisma/client/runtime/library.js:174:6754)
    at Rn.request (/home/container/node_modules/.pnpm/@prisma+client@4.16.1_prisma@4.16.1/node_modules/@prisma/client/runtime/library.js:174:6344)
    at async TicketArchiver.saveMessage (/home/container/src/lib/tickets/archiver.js:85:4)
    at async module.exports.run (/home/container/src/listeners/client/messageCreate.js:192:7) {
  code: 'P2003',
  clientVersion: '4.16.1',
  meta: { field_name: 'ticketId' }
}

Expected Behavior

No response

Steps To Reproduce

No response

Environment

- OS:
- Node:
- NPM:
- Bot:

Anything else?

No response