'makemigrations prompts the user when adding auto_now_add to an existing
model.'

@mock.patch('builtins.input', return_value='1')
@mock.patch('django.db.migrations.questioner.sys.stdin', mock.MagicMock(encoding=sys.getdefaultencoding()))
def test_makemigrations_auto_now_add_interactive(self, *args):

    class Entry(models.Model, ):
        title = models.CharField(max_length=255)
        creation_date = models.DateTimeField(auto_now_add=True)
        class Meta:
            app_label = 'migrations'
    with mock.patch('django.db.migrations.questioner.sys.stdout', new_callable=io.StringIO) as prompt_stdout:
        out = io.StringIO()
        with self.temporary_migration_module(module='migrations.test_auto_now_add'):
            call_command('makemigrations', 'migrations', interactive=True, stdout=out)
        output = out.getvalue()
        prompt_output = prompt_stdout.getvalue()
        self.assertIn("You    can    accept    the    default    'timezone.now'    by    pressing    'Enter'", prompt_output)
        self.assertIn('Add    field    creation_date    to    entry', output)
