Closed emoitzi closed 7 years ago
Thanks for bringing this to my attention; I'm not sure how I would implement a test for this situation, but I'll definitely keep it in mind for the future.
I have fixed this and pushed the fix to PyPI in version 0.5.0.3
for other users.
However, the fix for you may not be as straightforward. First off, install version 0.5.0.3
from PyPI (pip install --upgrade django-cities==0.5.0.3
). Then run python manage.py showmigrations cities
to list all migrations for this app.
0009
was not successfully applied (eg: has an [ ]
), you should be able to simply run migrations (python manage.py migrate cities
), then rerun the import script as normal.0009
was successfully applied (eg: has an [X]
), you'll need to manually drop the NOT NULL
constraint on the appropriate slug columns in your database. Then you can rerun the import script as normal.Post back here if you have any further issues or questions with/about this.
Closing, but feel free to reopen if it's not fixed.
The slug fields are required, but there are not migrations that fill in the data when applying the new migrations.
This effectively prevents an update in situations where purging the data is not possible.