If you, like me, have been using Django since before database migrations existed in the core functionality, that is, before Django 1.7; you have, more than likely, used third-party South migrations before. In this recipe, you will learn how to switch your project from South migrations to Django migrations.
Execute the following steps:
Migrate all your apps to the latest South migrations, as follows:
(myproject_env)$ python manage.py migrate
Remove
south
fromINSTALLED_APPS
in the settings.For each app with South migrations, delete the migration files and only leave the
migrations
directories.Create new migration files with the following command:
(my_project)$ python manage.py makemigrations
Fake the initial Django migrations as the database schema has already been set correctly:
(my_project)$ python manage.py migrate --fake-initial
If you have any...