1
0
mirror of https://github.com/django/django.git synced 2025-01-19 06:43:15 +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:
Cole D 2024-04-26 08:50:47 -04:00 committed by GitHub
parent c8df2f9941
commit e1431dd92e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View File

@ -123,7 +123,7 @@ class Command(BaseCommand):
if self.interactive:
answer = None
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:
answer = "n"
break

View File

@ -703,7 +703,7 @@ app label and migration name you want to squash up to, and it'll get to work:
- 0002_some_change
- 0003_another_change
- 0004_undo_something
Do you wish to proceed? [yN] y
Do you wish to proceed? [y/N] y
Optimizing...
Optimized from 12 operations to 7 operations.
Created new squashed migration /home/andrew/Programs/DjangoTest/test/migrations/0001_squashed_0004_undo_something.py