#22791: makemigrations interactive questioner ignores app labels
--------------------------------------+------------------------------------
Reporter: bendavis78 | Owner: whoshuu
Type: Cleanup/optimization | Status: assigned
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
--------------------------------------+------------------------------------
Comment (by whoshuu):
I'd actually change this ticket to, "makemigrations ignores app labels for
conflicts". From the looks of it, there are three issues I would classify
as improper behavior:
1. (Original ticket) Interactive questioner will ask a "y/N" question for
an app that was not specified.
2. An outstanding conflict in an unspecified app will throw a
`CommandErorr` if `merge` is set to `False`.
3. An outstanding conflict in an unspecified app **will** create a
migration file if `merge` is set to `True` and `interactive` is left as
`False`.
The expected behavior is to ignore apps that have not been specified when
at least one app has been specified. There are two ways of going about
eliminating these behaviors:
1. Filter out `conflicts` from `loader.detect_conflicts` in the
`makemigrations` module by `app_labels`. This localizes the required
changes but may be inefficient as conflicts will be scanned for
unspecified apps.
2. Pass in `app_labels` to `loader.detect_conflicts()` and only scan for
conflicts in the apps that have been specified. This is more efficient but
touches more code.
I'd like to hear what people have to say about this. If necessary, I can
create the tickets for issues 2 and 3 if merging them all into this one is
inappropriate.
--
Ticket URL: <https://code.djangoproject.com/ticket/22791#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 post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/068.7fcae4f4ea78b261b8922e24b0487f0d%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.