Repository navigation
|
I am using planetscale and I am trying to create new migrations. I created 2 branches one feature and other shadow. I yarn run v1.22.10
$ /Users/saihajpreetsingh/Desktop/scribedao/retweet/node_modules/.bin/prisma migrate dev
Environment variables loaded from .env
Prisma schema loaded from prisma/schema.prisma
Datasource "db": MySQL database "scribedao-prod" at "hbr7v1ewleao.us-east-3.psdb.cloud:3306"
Error: P3006
Migration `20210907234126_` failed to apply cleanly to the shadow database.
Error code: P3018
Error:
A migration failed to apply. New migrations cannot be applied before the error is recovered from. Read more about how to resolve migration issues in a production database: https://pris.ly/d/migrate-resolve
Migration name: 20210907234126_
Database error code: 1317
Database error:
Foreign keys cannot be created on this database. Learn more how to handle this: https://pris.ly/d/migrate-no-foreign-keys
Please check the query number 8 from the migration file.
Prisma version: |
Replies: 2 comments
|
@saihaj 👋 Currently we don't recommend using The best way to go for now is using |
|
Hi there, To keep our discussions organized and focused on the most relevant topics, we’re reviewing and tidying up our backlog. As part of this process, we’re closing discussions that have already been marked as answered but remain open. If this discussion still requires further input or clarification, feel free to reopen it or start a new one with updated details. Your contributions are invaluable to the community, and we’re here to help! For more details about our priorities and vision for the future of Prisma ORM, check out our latest blog post: https://www.prisma.io/blog/prisma-orm-manifesto. Thank you for your understanding and ongoing support of the Prisma community! |
@saihaj 👋
Currently we don't recommend using
prisma migrateon Planetscale. Also it seems that you are using foreign keys and Planetscale doesn't support that. The way to tell migrate not to create foreign keys is adding thereferentialIntegritypreview feature and usingreferentialIntegrity = "prisma"in the datasource that you can read about here.The best way to go for now is using
db pushwhen using PlanetScale and not using foreign keys.