Django Migrations Fake migrations


When a migration is run, Django stores the name of the migration in a django_migrations table.

Create and Fake initial migrations for existing schema

If your app already has models and database tables, and doesn’t have migrations. First create initial migrations for you app.

python makemigrations your_app_label

Now fake initial migrations as applied

python migrate --fake-initial

Fake all migrations in all apps

python migrate --fake

Fake single app migrations

python migrate --fake core

Fake single migration file

python migrate myapp migration_name