#24735: "manage.py makemigrations --noinput" asks for renaming of fields
----------------------------+--------------------------------------
Reporter: blueyed | Owner: nobody
Type: Bug | Status: new
Component: Migrations | Version: 1.8
Severity: Normal | Resolution:
Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
----------------------------+--------------------------------------
Changes (by blueyed):
* needs_better_patch: => 0
* needs_tests: => 0
* needs_docs: => 0
Comment:
This patch appears to fix it, but is generally untested:
{{{
diff --git i/django/core/management/commands/makemigrations.py
w/django/core/management/commands/makemigrations.py
index 1b5addc..d971e96 100644
--- i/django/core/management/commands/makemigrations.py
+++ w/django/core/management/commands/makemigrations.py
@@ -93,11 +93,20 @@ def handle(self, *app_labels, **options):
if self.merge and conflicts:
return self.handle_merge(loader, conflicts)
+ questioner_kwargs = {
+ 'specified_apps': app_labels,
+ 'dry_run': self.dry_run
+ }
+ if self.interactive:
+ questioner =
InteractiveMigrationQuestioner(**questioner_kwargs)
+ else:
+ questioner = MigrationQuestioner(**questioner_kwargs)
+
# Set up autodetector
autodetector = MigrationAutodetector(
loader.project_state(),
ProjectState.from_apps(apps),
- InteractiveMigrationQuestioner(specified_apps=app_labels,
dry_run=self.dry_run),
+ questioner,
)
# If they want to make an empty migration, make one for each app
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/24735#comment:1>
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/065.fff4761c2312e03ad33e61402db121ca%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.