Django Migrations

Help us to keep this website almost Ad Free! It takes only 10 seconds of your time:
> Step 1: Go view our video on YouTube: EF Core Bulk Insert
> Step 2: And Like the video. BONUS: You can also share it!

Parameters

django-admin commandDetails
makemigrations <my_app>Generate migrations for my_app
makemigrationsGenerate migrations for all apps
makemigrations --mergeResolve migration conflicts for all apps
makemigrations --merge <my_app>Resolve migration conflicts for my_app
makemigrations --name <migration_name> <my_app>Generate a migration for my_app with the name migration_name
migrate <my_app>Apply pending migrations of my_app to the database
migrateApply all pending migrations to the database
migrate <my_app> <migration_name>Apply or unapply up to migration_name
migrate <my_app> zeroUnapply all migrations in my_app
sqlmigrate <my_app> <migration_name>Prints the SQL for the named migration
showmigrationsShows all migrations for all apps
showmigrations <my_app>Shows all migrations in my_app


Got any Django Question?