10👍
✅
Database migrations are not built-in to Django, so you’ll need to use a third party library. I highly recommend south.
5👍
south is very nice and all that, but if this is a very rare one-off thing then just fire up your favourite mysql tool and do something like: ALTER TABLE foo ADD COLUMN wotsit VARCHAR(100) – I can’t remember the exact syntax…
But +1 for south.
- [Django]-Django.core.urlresolvers.resolve incorrect behavior under apache non-root deployment
- [Django]-DJANGO: Change field size of ModelMultipleChoiceField?
- [Django]-How to have nested url namespaces with a dynamic first part in Django
- [Django]-Resize image in the views and load it in the templates in django
- [Django]-How can I test to see if a class contains a particular attribute?
-2👍
You have to dump your previous data.
manage.py dumpdata > dump.json
And you can load your data after syncdb. (“c” column have to permit null)
manage.py loaddata dump.json
- [Django]-PHP and Django: Nginx, FastCGI and Green Unicorn?
- [Django]-TinyMCE popups not loading when using S3 and setting document.domain
Source:stackexchange.com