In Django 1.10.6, I made a model, and ran python manage.py makemigrations
and python manage.py migrate
, it created a table in MySQL DB. Later I came to know that the table was not required. I searched and found an answer here . But that was for the versions before 1.9. In Django 1.9 sqlclear
has been removed. Now my doubt is,
how can I drop a table from the DB using Django, for versions greater than 1.9?
Is there any sqlclear
equivalent in versions greater than 1.9?
Kindly help.
1. Delete your Model for the Table or comment it out totally
2. python manage.py makemigrations
3. python manage.migrate
hope it helps
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.