12👍
You need to do schemamigration app --initial
first without your new field, then migrate app --fake 0001
(or whichever migration number it returned) to set the south database to that state (tables already created).
Add your new field, then run schemamigration myapp --auto
, then migrate.
1👍
I commented out the field, ran schemamigration, then migrate. Uncommented out the field, ran schemamigration, then migrate and it worked. Not sure what I was doing wrong.
- [Django]-Autocomplete with django-autocomplete-light’s
- [Django]-Show management commands in admin site
- [Django]-Create a git repo for project skeleton
- [Django]-Looking for read-write lock in Django using PostgreSQL, e.g., SELECT FOR SHARE
0👍
This happens when you doing something on migration and did not let south knows about it.
If you looking at the south_* table in the database, you will find-out south keeps logs about db migrations in the database. The common way is to faking the migration.
There is a fake
argument for the South.
here you can find out what is all about:
http://south.readthedocs.org/en/latest/commands.html#options
- [Django]-Django Rest Framework view returns an empty object
- [Django]-Django get query execution time
- [Django]-JS: how generate the product array for Google Analytics dataLayer?