Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

The underlying table for model 'Order' does not exist. Error code: P1014 (Prisma)

I have such problem as below

$ prisma migrate dev --name "ok"
    
Error: P3006
    
Migration `2021080415559_order_linking` failed to apply clearnly to the shadow database.
Error code: P1014
Error:
The underlying table for model 'Order' does not exist.

How to fix it?

like image 700
hellvisor Avatar asked Sep 05 '25 16:09

hellvisor


1 Answers

The solution:

It seems that this may be due to the migration file in the prisma folder. I decided to delete the Migration Files and the whole folder with it. I restarted the application, it got a new file and it worked.

*delete the migrations folder*

$ prisma generate

$ prisma migrate dev --name "ok"

*it works*
like image 152
hellvisor Avatar answered Sep 07 '25 17:09

hellvisor



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!