Upgrade path from 1.0 datamodel #2225
-
I posted this question in the slack channel but I didn't get a response, so I was hoping if I reposted here, I might be able to resolve my problem.I'm excited to try the new product as I've been on Prisma for a while now and have a pretty sizable database on it. I started poking around Prisma 2 finally today and it has a lot of features I'm really excited about. I used
We started prior to the release of the 1.1 datamodel and as such, we have relation tables in the database ( In doing some research, I came across this the guide here that explains how to upgrade from I'm wondering what our upgrade path is here. Do we need to do a manual migration to add foreign keys to all of our tables where relationships are defined by a relation table? Thanks in advance, |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hey @harpe116 👋 apologies for the delay on this one!
Indeed, all relations in Prisma 2 are always based on foreign keys in the underlying DB.
We are currently in the process of researching and defining the best upgrade paths for Prisma 1 users and will share more about this soon. You can track the developments in this GitHub issue where we're posting updates about the research: #1937 It'll likely be the case that some schema wrangling with SQL will be necessary for a proper upgrade – our goal is to build additional tools to help you with the upgrade (e.g. by auto-generating the SQL commands that you need to run to make the DB schema compatible with Prisma 2). So, unfortunately I don't have a perfect answer for you right now (other than asking for a bit more patience until we have figured things out internally and then share our findings publicly 🙏 ). Please feel free to ping me directly on the Prisma Slack (I'm |
Beta Was this translation helpful? Give feedback.
Hey @harpe116 👋 apologies for the delay on this one!
Indeed, all relations in Prisma 2 are always based on foreign keys in the underlying DB.
We are currently in the process of researching and defining the best upgrade paths for Prisma 1 users and will share more about this soon. You can track the developments in this Gi…