Then trying to create 10 channel_thread_message I had this error:
Raw query failed. Code: `23505`. Message: `Key (url_slug)=(https://loremflickr.com/640/480) already exists.`
at In.handleRequestError (/Users/avallete/Documents/Programming/Snaplet/examples/seed/slack-prisma/node_modules/@prisma/client/runtime/library.js:122:6854)
at In.handleAndLogRequestError (/Users/avallete/Documents/Programming/Snaplet/examples/seed/slack-prisma/node_modules/@prisma/client/runtime/library.js:122:6188)
at In.request (/Users/avallete/Documents/Programming/Snaplet/examples/seed/slack-prisma/node_modules/@prisma/client/runtime/library.js:122:5896)
at async l (/Users/avallete/Documents/Programming/Snaplet/examples/seed/slack-prisma/node_modules/@prisma/client/runtime/library.js:127:11167)
at SeedPrisma.execute (/Users/avallete/Documents/Programming/Snaplet/examples/seed/slack-prisma/node_modules/@snaplet/seed/dist/src/adapters/prisma/prisma.js:20:36)
at Plan.runStatements (/Users/avallete/Documents/Programming/Snaplet/examples/seed/slack-prisma/node_modules/@snaplet/seed/dist/src/dialects/postgres/client.js:25:29)
at Plan.run (/Users/avallete/Documents/Programming/Snaplet/examples/seed/slack-prisma/node_modules/@snaplet/seed/dist/src/core/plan/plan.js:356:9)
at main (/Users/avallete/Documents/Programming/Snaplet/examples/seed/slack-prisma/seed.ts:16:3) {
code: 'P2010',
clientVersion: '5.13.0',
meta: {
code: '23505',
message: 'Key (url_slug)=(https://loremflickr.com/640/480) already exists.'
}
}
Which was due to the fact that the url_slug wasn't detected because prisma declare it via a UNIQUE INDEX.
Detected this bug using a prisma generated schema:
Then trying to create 10
channel_thread_message
I had this error:Which was due to the fact that the
url_slug
wasn't detected because prisma declare it via aUNIQUE INDEX
.