Django delete migrations

 

If you want to re-create the form, proceed as follows:

 

1. Remove the table from the database

DROP TABLE `table_name`;

 

2. Delete the file migrations

APP file migrations file in the name of the folder, delete all

 

3. Delete records in the database

DELETE FROM `django_migrations` WHERE app='your_app_name';

 

4. migrate and re makemigrations

 

Guess you like

Origin www.cnblogs.com/zoneofmine/p/11299118.html