1
0
Fork 0
mirror of https://github.com/yweber/lodel2.git synced 2025-11-25 23:06:55 +01:00
lodel2_mirror/makemigrations_interactive_rename.patch

24 lines
1,017 B
Diff

--- orig/django/core/management/commands/makemigrations.py 2015-09-16 11:52:59.456895569 +0200
+++ new/django/core/management/commands/makemigrations.py 2015-09-16 11:51:34.344896348 +0200
@@ -84,11 +84,20 @@ class Command(BaseCommand):
if self.merge and conflicts:
return self.handle_merge(loader, conflicts)
+ questionner_kwargs = {
+ 'specified_apps': app_labels,
+ 'dry_run': self.dry_run
+ }
+ if self.interactive:
+ questionner = InteractiveMigrationQuestioner(**questionner_kwargs)
+ else:
+ questionner = MigrationQuestioner(**questionner_kwargs)
+
# Set up autodetector
autodetector = MigrationAutodetector(
loader.project_state(),
ProjectState.from_apps(apps),
- InteractiveMigrationQuestioner(specified_apps=app_labels, dry_run=self.dry_run),
+ questionner
)
# If they want to make an empty migration, make one for each app