I have two models: Clause and Template, they have been migrated locally, but I want to delete one of them. The question is: If I just delete it from models.py and admin.py, and run makemigration and migrate, how can I delete and the related DB table as well? Should I delete DB table manualy or the migrations will delete it ?
Asked
Active
Viewed 649 times
0
-
Yes, if you delete the model you will lose all associated model data. – Anthony Apr 06 '21 at 11:26
1 Answers
0
If you delete one or more from the models.py they will be deleted also in the DB.
The makemigration resets the DB and the migrate command will confirm it.

mike_thecode
- 171
- 2
- 6