Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve readability of data loss warnings when running migrate dev #6056

Closed
albertoperdomo opened this issue Mar 11, 2021 · 0 comments · Fixed by #6068
Closed

Improve readability of data loss warnings when running migrate dev #6056

albertoperdomo opened this issue Mar 11, 2021 · 0 comments · Fixed by #6068
Assignees
Labels
kind/improvement An improvement to existing feature and code. team/schema Issue for team Schema. topic: cli topic: prisma migrate dev CLI: prisma migrate dev
Milestone

Comments

@albertoperdomo
Copy link
Contributor

albertoperdomo commented Mar 11, 2021

Problem

We currently display "There will be data loss" when displaying warnings as a headline, but this is not accurate.

The wording of the prompt is something we should correct. Warnings cover two things:

  • Potentially destructive operations
  • Operations that may fail

Yours is the second case (the unique constraint). Also note that currently, renaming a field is a lossy migration (we have plan for that in the near future). We can't differentiate this from "a field was removed, and a field with a different name was added".

Suggested solution

Replace the heading "There will be data loss:" with "Warnings:"

Additional context

Internal thread: https://prisma-company.slack.com/archives/CGMCB82N8/p1615322278013500

@albertoperdomo albertoperdomo added team/schema Issue for team Schema. topic: cli topic: prisma migrate dev CLI: prisma migrate dev kind/improvement An improvement to existing feature and code. labels Mar 11, 2021
@albertoperdomo albertoperdomo added this to the 2.19.0 milestone Mar 11, 2021
This was referenced Mar 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/improvement An improvement to existing feature and code. team/schema Issue for team Schema. topic: cli topic: prisma migrate dev CLI: prisma migrate dev
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants