Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Django - 'sqlclear' equivalent in Django > 1.9

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.

like image 504
Jeril Avatar asked Feb 06 '26 03:02

Jeril


1 Answers

1. Delete your Model for the Table or comment it out totally
2. python manage.py makemigrations 
3. python manage.migrate

hope it helps

like image 159
Exprator Avatar answered Feb 09 '26 01:02

Exprator



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!