Broken Yolk
Broken Yolk
PPrisma
Created by Broken Yolk on 1/14/2025 in #help-and-questions
Migration to v6 Cockroach DB
I am working on my local environment on a project that uses Prisma. The config looks like this:
generator client {
provider = "prisma-client-js"
output = "../node_modules/@internal/prisma-configuration/client"
}

datasource db {
provider = "cockroachdb"
url = env("DB_CONNECTION_URL")
}
generator client {
provider = "prisma-client-js"
output = "../node_modules/@internal/prisma-configuration/client"
}

datasource db {
provider = "cockroachdb"
url = env("DB_CONNECTION_URL")
}
The prisma-configuration client is the client for the configuration service in a Turborepo. We have more services, all with their own Prisma clients. After upgrading from version 5 to version 6, nothing happens when I run npx prisma migrate dev --name upgrade-to-v6. It doesn't automatically change the structure of the tables that manage implicit relationships, even though I have multiple of these tables. When I inspect my database tables, they all still have the structure as before, with unique constraint on columns A and B. That leaves me with a couple of questions: - Does the automatic migration only work for PostgreSQL and not for CockroachDB? - If you can confirm that this does not work automatically, should I continue by creating the migration manually? - Or can I skip this step for CockroachDB? Since I would have to do it manually after adding any implicit m-to-n relationship.
9 replies