Closed mhl closed 11 years ago
Number 2 is dealt with (from this point on, anyway) by 11a7d0f
The remaining issues are these three:
~ Changed field entered on core.InformationSource ~ Changed field can_be_featured on core.Person ~ Changed field requires_place on core.PositionTitle
For all of these, South is trying to add blank=True
in its automatically generated migration.
For example, the field can_be_featured
of Person
is curious - it doesn't appear to have changed in any of the model fields of migrations since it was added:
$ grep can_be_featured core/migrations/*.py
core/migrations/0030_[..]: # Adding field 'Person.can_be_featured'
core/migrations/0030_[..]: db.add_column('core_person', 'can_be_featured', self.gf('django.db.models.fields.BooleanField')(default=False), keep_default=False)
core/migrations/0030_[..]: # Deleting field 'Person.can_be_featured'
core/migrations/0030_[..]: db.delete_column('core_person', 'can_be_featured')
core/migrations/0030_[..]: 'can_be_featured': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
core/migrations/0031_[..]: 'can_be_featured': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
core/migrations/0032_[..]: 'can_be_featured': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
core/migrations/0033_[..]: 'can_be_featured': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
... and it hasn't been changed in models.py
. However, in the generated migration, it ends up as:
'can_be_featured': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
... and the forward action of the generated migration is trying to do:
# Changing field 'Person.can_be_featured'
db.alter_column('core_person', 'can_be_featured', self.gf('django.db.models.fields.BooleanField')(blank=True))
The case of entered
in core.InformationSource
is also interesting. In the representation of the models in migrations 0004 up to 0027, entered
is {'default': 'False', 'blank': 'True'}
, but in 0028 to 0033 it is {'default': 'False'}
, but the definition of entered
in models.py
hasn't changed since the introduction of the InformationSource model. (Checked with git log --follow -Gentered -p core/models.py
.)
There are various fields in the committed
core/models.py
that appear not to have had migrations generated for them:At least the
PlaceKind.plural_name
one is a case where a bad merge caused it not to appear in the models field of migrations 0032 and 0033 even though it was introduced in 0031. (That can be fixed up by updating the models field in the latter two from 0031.)The others mentioned above still need to be investigated.
There are some other migration oddities that I've spotted - for example:
disabled_comment appears in the models field of 0031, but wasn't introduced in any migration.(This was a from a migration in thescorecards
application, notcore
.)updated
andcreated
fields.