#31700: Highlight destructive operations in makemigrations output
-----------------------------+------------------------------------
Reporter: Tom Forbes | Owner: nobody
Type: New feature | Status: new
Component: Migrations | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-----------------------------+------------------------------------
Changes (by Carlton Gibson):
* status: closed => new
* resolution: needsinfo =>
* stage: Unreviewed => Accepted
Comment:
A similar example of a dangerous migration with a rename involving
`verbose_name` has come up in #32206. That looks like a case where a
warning would come in handy.
[https://groups.google.com/g/django-
developers/c/A0m8YkPKpZo/m/elJVb9JCAgAJ Tobias McNulty had a suggestion on
the mailing list thread]:
> I'm +1 to doing *something.* Absent a louder reminder, I think it's
unrealistic to expect everyone to read the output of makemigrations all
the time.
>
> As others have said, I'm not sure `manage.py migrate` is the right time.
I think it's too late. The code may have already been committed, who knows
what machine the migrations are being run on, etc.
>
> During makemigrations, on the other hand, I don't see anything wrong
with formatted text or +/-, but I might go a step further. We already
prompt for things like renames and merges. Why not forcibly gain user
acceptance before creating a migration that deletes something? ...
Let's take this as an opportunity to give users better warnings to check
twice here.
--
Ticket URL: <https://code.djangoproject.com/ticket/31700#comment:3>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/061.690363eb3ce1735a92efb0ab54ef6bfd%40djangoproject.com.