Kilian
Kilian
PPrisma
Created by Kilian on 6/11/2024 in #help-and-questions
How to add new schema with multiSchema feature without database reset
When adding a new empty schema to out prisma.schema migration detects a drift and asks us to drop the database even though nothing else has changed. How can I add a new empty schema without dropping all the data?
generator client {
provider = "prisma-client-js"
previewFeatures = ["multiSchema", "views", "relationJoins"]
}

datasource db {
provider = "postgresql"
url = env("DATABASE_URL")
schemas = ["schema1", "public", "new_schema"]
}
generator client {
provider = "prisma-client-js"
previewFeatures = ["multiSchema", "views", "relationJoins"]
}

datasource db {
provider = "postgresql"
url = env("DATABASE_URL")
schemas = ["schema1", "public", "new_schema"]
}
2 replies