Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failing seed script #700

Open
adamalfredsson opened this issue Jan 19, 2024 · 0 comments · May be fixed by #701
Open

Failing seed script #700

adamalfredsson opened this issue Jan 19, 2024 · 0 comments · May be fixed by #701
Assignees
Labels

Comments

@adamalfredsson
Copy link
Collaborator

Running seed command `npx ts-node prisma/seed.ts` ...
PrismaClientKnownRequestError: 
Invalid `prisma.organizations.createMany()` invocation in
/Users/Adam/Projects/geeffektivt/effekt/effekt-backend/prisma/seed.ts:43:30

  40 await prisma.payment.createMany({ data: fakePayments });
  41 await prisma.donors.createMany({ data: fakeDonors });
  42 await prisma.cause_areas.createMany({ data: fakeCauseAreas });
→ 43 await prisma.organizations.createMany(
Foreign key constraint failed on the field: `cause_area_ID`
    at Pn.handleRequestError (/Users/Adam/Projects/geeffektivt/effekt/effekt-backend/node_modules/@prisma/client/runtime/library.js:171:6929)
    at Pn.handleAndLogRequestError (/Users/Adam/Projects/geeffektivt/effekt/effekt-backend/node_modules/@prisma/client/runtime/library.js:171:6358)
    at Pn.request (/Users/Adam/Projects/geeffektivt/effekt/effekt-backend/node_modules/@prisma/client/runtime/library.js:171:6237) {
  code: 'P2003',
  clientVersion: '4.14.0',
  meta: { field_name: 'cause_area_ID' }
}
@adamalfredsson adamalfredsson self-assigned this Jan 19, 2024
@adamalfredsson adamalfredsson linked a pull request Jan 19, 2024 that will close this issue
8 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant