I'm trying to initialize the database with Prisma using the following command:
npx prisma migrate dev --name init
However, it complains that my database is not in sync and shows me table names from another database and ask if I want to reset it.
Here is the schema:
generator client {
provider = "prisma-client-js"
}
datasource db {
provider = "sqlserver"
url = env("DATABASE_URL")
}
model Test {
id Int @id @default(autoincrement())
}
And the connection string:
sqlserver://localhost\SQLEXPRESS;initialCatalog=sample;integratedSecurity=true;trustServerCertificate=true;
The catalog "sample" is defined there, but for some reason, it is trying to connect to another existing database.
I tried to create the "sample" database manually but it doesn't change anything.
What am I missing here ?