Skip to content

prisma migrate dev --create-only- if there are data loss warnings, the CLI prompts suggest the new migration will be applied when it is (rightfully)not  #5605

@albertoperdomo

Description

@albertoperdomo
> DATABASE_URL="..." npx prisma migrate dev --create-only --preview-feature
Environment variables loaded from prisma/.env
Prisma schema loaded from prisma/schema.prisma
Datasource "db"


⚠️  There will be data loss when applying the migration:

  • You are about to drop the column `profileId` on the `User` table, which still contains 1 non-null values.
  • The migration will add a unique constraint covering the columns `[userId]` on the table `Profile`. If there are existing duplicate values, the migration will fail.

✔ Are you sure you want create and apply this migration? Some data will be lost. … yes
✔ Name of migration … refactor-1-1
Prisma Migrate created the following migration without applying it 20210211213230_refactor_1_1

You can now edit it and apply it by running prisma migrate dev --preview-feature.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions