Hi, I want to initialise a migration on an existin...
# orm-help
b
Hi, I want to initialise a migration on an existing DB using this command
npx prisma migrate dev --create-only
but I still get a prompt that request me to reset my database what i want to avoid. Is it possible to do that without reset my db?
Copy code
/app $ npx prisma migrate dev --create-only
Environment variables loaded from .env
Prisma schema loaded from prisma/schema.prisma
Datasource "db": PostgreSQL database "mercure", schema "public" at "db:5432"

? Drift detected: Your database schema is not in sync with your migration history.

The following is a summary of the differences between the expected database schema given your migrations files, and the actual schema of the database.

It should be understood as the set of changes to get from the expected schema to the actual schema.

[+] Added tables
  - mercure_configs
  - mercure_responses

[*] Changed the `mercure_configs` table
  [+] Added unique index on columns (po)


We need to reset the PostgreSQL database "mercure" at "db:5432".
Do you want to continue? All data will be lost. › (y/N)
r
@Bamada 👋 For an existing database, you would need to follow these instructions and for setting up the initial migration, your dev environment would need to be reset.
b
thks