#34568: makemigrations --update should respect the --name option.
-------------------------------------+-------------------------------------
Reporter: David Sanders | Owner: Mariusz
| Felisiak
Type: Bug | Status: closed
Component: Database layer | Version: 4.2
(models, ORM) |
Severity: Release blocker | Resolution: fixed
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Natalia Bidart):
Replying to [comment:11 David Sanders]:
> One more thing:
>
> `--update` is a destructive operation – if you had any customised
migration operations or code in your latest migration this will be
permanently deleted if you run update *without any warning*.
>
> I'd like to suggest that *at least* one of the following happen:
>
> 1. `--update` does a confirmation eg
"<app>/migrations/0009_last_migration.py will be replaced. Proceed? y/N".
Along with this we provide a `--no-input`. Both of these are consistent
with other commands.
> 2. we document that it destroys your last migration without warning
>
> My preference is 1. because, to paraphrase FunkyBob, the purpose of any
framework is to manage the risky and the tedious.
>
> We should at the very least do 2. if it's decided 1. is a no-go.
>
> This also sounds like another ticket.
I agree this should be another ticket, and I also agree overwriting
without any warning feels like an antipattern. I would definitely go with
(1).
Having said the above, are you positive overwrites are happening? If so,
could you please provide the sequence of commands that would trigger that
situation in the new ticket? Thanks!
--
Ticket URL: <https://code.djangoproject.com/ticket/34568#comment:16>
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/0107018829f8f6ba-567abe03-c2b0-4807-ad4a-14126e46559d-000000%40eu-central-1.amazonses.com.