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

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 )

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 26 (19 by maintainers)

Most upvoted comments

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

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?

@thedavidprice Let’s discuss on Tuesday and see if we can come up with a reasonable solution…my personal fix was to use a global but there be other ways someone can suggest!