P
Prisma2mo ago
Kilian

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"]
}
0 Replies
No replies yetBe the first to reply to this messageJoin