﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
34988	Makemigrations shouldn't prompt for default values for non-nullable fields of other apps.	Sarah Boyce	Bhuvnesh	"Have more than one app (app_1 and app_2). In app_1 have a model that has it's migrations applied then add a field that doesn't have a default and is not nullable (do not run makemigrations).
Then add a new model (or anything that would require a migration) to app_2.
Run `manage.py makemigrations app_2`

You get prompted for every app that has unapplied migrations missing defaults even though you're running migrations for a different app. 
I would expect it not to care, as you can input temporary defaults to all these other apps and it doesn't do anything with them.

I think this might be a test case:

{{{
diff --git a/tests/migrations/test_commands.py b/tests/migrations/test_commands.py
index a9c1cdf893..518ebef872 100644
--- a/tests/migrations/test_commands.py
+++ b/tests/migrations/test_commands.py
@@ -1979,6 +1979,39 @@ class MakeMigrationsTests(MigrationTestBase):
         self.assertIn(""Remove field silly_field from sillymodel"", out.getvalue())
         self.assertIn(""Add field silly_rename to sillymodel"", out.getvalue())

+    @override_settings(
+        INSTALLED_APPS=[
+            ""migrations"",
+            ""migrations.migrations_test_apps.migrated_app"",
+        ]
+    )
+    def test_makemigrations_interactive_not_null_addition_multiple_apps_single_call(self):
+        class Author(models.Model):
+            silly_author_field = models.BooleanField(null=False)
+
+            class Meta:
+                app_label = ""migrations""
+
+        class NewModel1(models.Model):
+            class Meta:
+                app_label = ""migrated_app""
+
+        input_msg = (
+            ""It is impossible to add a non-nullable field 'silly_author_field' to ""
+            ""author without specifying a default. This is because the ""
+            ""database needs something to populate existing rows.\n""
+            ""Please select a fix:\n""
+            "" 1) Provide a one-off default now (will be set on all existing ""
+            ""rows with a null value for this column)\n""
+            "" 2) Quit and manually define a default value in models.py.""
+        )
+        with self.temporary_migration_module(module=""migrations.test_migrations""):
+            with mock.patch(""builtins.input"", return_value=""1""):
+                with captured_stdout() as out:
+                    call_command(""makemigrations"", ""migrated_app"", interactive=True)
+            output = out.getvalue()
+            self.assertNotIn(input_msg, output)
+
     @mock.patch(""builtins.input"", return_value=""Y"")
     def test_makemigrations_model_rename_interactive(self, mock_input):
         class RenamedModel(models.Model):
}}}
"	Cleanup/optimization	assigned	Migrations	dev	Normal		makemigrations	Bhuvnesh	Accepted	0	0	0	0	0	0
