1
0
mirror of https://github.com/django/django.git synced 2025-10-31 09:41:08 +00:00

Fixed #22676 -- makemigrations --dry-run should not ask for defaults

Made the fix in InteractiveMigrationQuestioner class code, rather than
MigrationAutodetector, because --dry-run shouldn't affect whether
MigrationAutodetector will detect non-nullable fields, but the
questioner should skip the question and returns a None for default
(since that won't be used anyway) if --dry-run is used.
This commit is contained in:
Moayad Mardini
2014-05-22 12:42:46 +03:00
parent f01d2a8f9b
commit ee14961a2a
5 changed files with 79 additions and 33 deletions

View File

@@ -0,0 +1,23 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
]
operations = [
migrations.CreateModel(
name='SillyModel',
fields=[
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
('silly_field', models.BooleanField(default=False)),
],
options={
},
bases=(models.Model,),
),
]