Ticket #337 (closed defect: worksforme)
Fails to Alter Table when also adding a geometry
|Reported by:||barnaby@…||Owned by:||andrew|
Migration cannot alter table in regular way while adding geography field. It falsely claims that it ran the ALTER TABLE command for the non-geographic field, but the table is not altered to include it, only the geographic field.
How to duplicate this bug:
1) add 3 fields:
(P.S. don't forget to change import statement to "from django.contrib.gis.db import models")
3) run ./manage.py startmigration and observe which commands it claims to have ran, it includes an ALTER TABLE command for the "state" column
4) go into database and inspect which columns were added, and notice that only the geography was added, the state column was not actually added
5) just to be sure, roll back the migration (may involve manually altering the table so that backwards() works) and in its place create 2 separate migrations, one for the geographic field, and one for the CharField? (e.g. the "state" column). They work individually, but not together.