mirror of
https://github.com/django/django.git
synced 2025-06-05 11:39:13 +00:00
Made confirmation prompt in squashmigrations consistent with other prompts.
Prior to this change, squashmigrations would use a [yN] prompt to ask for user confirmation. A slash was added between the yes/no options to make it consistent with other commands that print similar prompts.
This commit is contained in:
parent
c8df2f9941
commit
e1431dd92e
@ -123,7 +123,7 @@ class Command(BaseCommand):
|
|||||||
if self.interactive:
|
if self.interactive:
|
||||||
answer = None
|
answer = None
|
||||||
while not answer or answer not in "yn":
|
while not answer or answer not in "yn":
|
||||||
answer = input("Do you wish to proceed? [yN] ")
|
answer = input("Do you wish to proceed? [y/N] ")
|
||||||
if not answer:
|
if not answer:
|
||||||
answer = "n"
|
answer = "n"
|
||||||
break
|
break
|
||||||
|
@ -703,7 +703,7 @@ app label and migration name you want to squash up to, and it'll get to work:
|
|||||||
- 0002_some_change
|
- 0002_some_change
|
||||||
- 0003_another_change
|
- 0003_another_change
|
||||||
- 0004_undo_something
|
- 0004_undo_something
|
||||||
Do you wish to proceed? [yN] y
|
Do you wish to proceed? [y/N] y
|
||||||
Optimizing...
|
Optimizing...
|
||||||
Optimized from 12 operations to 7 operations.
|
Optimized from 12 operations to 7 operations.
|
||||||
Created new squashed migration /home/andrew/Programs/DjangoTest/test/migrations/0001_squashed_0004_undo_something.py
|
Created new squashed migration /home/andrew/Programs/DjangoTest/test/migrations/0001_squashed_0004_undo_something.py
|
||||||
|
Loading…
x
Reference in New Issue
Block a user