Wednesday, 25 May 2022

Django re-run migrations 

python showmigrations

python migrate {app name from show migrations} {00##_migration}

If you want to revert all migrations, use zero as the name of the migration:

python migrate app_name_here zero

Delete the migration file. Once the desired migration is in your models...

python makemigrations
python migrate

No comments:

Post a Comment