Django migrates and automates an automatic yes at the prompt

Is there a way to automatically specify YES as the default option on

manage.py makemigrations myAPp and manage.py migrate commands 

I tried the --noinput option when porting, but I think by default it is NOT

+5
source share
2 answers

found an answer to another question

You can use the yes command, which passes "y" to all questions

 yes | python manage.py makemigrations myApp 

if you want to edit the answer (for example, send "yes" instead of "y"), you can add it as a parameter

 yes yes | python manage.py migrate 
+5
source

Your migrations must be performed with the --noinput flag.

You might want to migrate the same application for which the migrations were created.

Try running python manage.py showmigrations before and after starting your migrations to see what happens.

+5
source

Source: https://habr.com/ru/post/1258063/


All Articles