summaryrefslogtreecommitdiff
path: root/django
diff options
context:
space:
mode:
authorHuu Nguyen <whoshuu@gmail.com>2014-06-19 16:50:01 -0700
committerTim Graham <timograham@gmail.com>2014-06-20 08:55:02 -0400
commitfbb684d95ed71487fe16135321d59ddb043ee903 (patch)
treec1facb6b51569a6a8bbe658fa01ed3c3ca3760b9 /django
parent608aa8d101b03004ed2181fac82d8f3d28253bbd (diff)
Fixed #22862 -- Added --noinput option to makemigrations.
Thanks artortenburger for the report.
Diffstat (limited to 'django')
-rw-r--r--django/core/management/commands/makemigrations.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/django/core/management/commands/makemigrations.py b/django/core/management/commands/makemigrations.py
index 9f20743869..42e57cd17d 100644
--- a/django/core/management/commands/makemigrations.py
+++ b/django/core/management/commands/makemigrations.py
@@ -25,6 +25,8 @@ class Command(BaseCommand):
help="Enable fixing of migration conflicts.")
parser.add_argument('--empty', action='store_true', dest='empty', default=False,
help="Create an empty migration.")
+ parser.add_argument('--noinput', action='store_false', dest='interactive', default=True,
+ help='Tells Django to NOT prompt the user for input of any kind.')
def handle(self, *app_labels, **options):
@@ -154,7 +156,7 @@ class Command(BaseCommand):
if self.interactive:
questioner = InteractiveMigrationQuestioner()
else:
- questioner = MigrationQuestioner()
+ questioner = MigrationQuestioner(defaults={'ask_merge': True})
for app_label, migration_names in conflicts.items():
# Grab out the migrations in question, and work out their
# common ancestor.