I'm currently in the process of configuring Prisma migrate on a pre-populated MySQL database in my development environment, but I'm facing challenges getting it to function correctly.
1.
After executing prisma db pull
successfully to generate the schema (which went smoothly), I encountered a warning when running
prisma migrate dev --name initial-migration --create-only
, prompting me to RESET the database. Since this was not the desired outcome...
2. I proceeded to utilize the command
prisma migrate diff --from-empty --to-schema-datamodel prisma/schema.prisma --script > migration.sql
and then manually transferred the SQL file to a newly created prisma/migrations/init folder.
3. Moving forward, I attempted to establish a baseline for the migration by running
prisma migrate resolve --applied "initial"
However, an error emerged stating that the migration could not be located, despite its presence and recognition by Prisma.