question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Upgraded to v0.38 Jest db teardown Prisma + Postgresql violation

See original GitHub issue

It seems Prisma v3 upgrade breaks existing Jest teardown db clean up due to table dependency violation. Screen Shot 2021-10-31 at 5 46 14 pm

Long story short, I have two tables, Company and CompanyProfile, they are basically coupled so when creating a new company will automatically create a new companyProfile as well then linked together, looks like the teardown trying to delete the Company table but due to relation so it is prohibited. I did a quick try by disabling createCompanyProfile in the createCompany service and it works just fine.

Screen Shot 2021-10-31 at 5 46 22 pm Screen Shot 2021-10-31 at 5 50 14 pm )

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:26 (19 by maintainers)

github_iconTop GitHub Comments

2reactions
cannikincommented, Nov 9, 2021

We’ve got a plan! No need for a global, we’ll have the computer figure this out. PR coming soon…

2reactions
thedavidpricecommented, Nov 2, 2021

Thanks for reporting this @LBrian

@cannikin is this related to #3680? Either way, do you think this should be prioritized for a v0.38 patch?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Testing with Prisma · Discussion #2083 - GitHub
I will focus on unit tests since the integration are still a work in progress. We have a graphql API and we store...
Read more >
Integration testing with Prisma
One way to simulate a real world environment is to use Docker to encapsulate a database and some test data. This can be...
Read more >
Unit testing with Prisma
Unit testing aims to isolate a small portion (unit) of code and test it for logically predictable behaviors. It generally involves mocking objects...
Read more >
Upgrading the Prisma layer to Prisma 2 | PostgreSQL
Overview. This page explains the first step of your upgrade process: Taking your Prisma 1 configuration and upgrading it to Prisma 2.
Read more >
TypeScript, PostgreSQL, Prisma Backend | REST API ...
Backend with TypeScript, PostgreSQL & Prisma: REST, Validation & Tests ... Testing: Write tests for the REST endpoints with Jest and Hapi's ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found