How to Delete a Table from a Database in Django
tieje
Posted on April 4, 2022
Solution Link
Solution
How to delete a single table in Django 4.0:
- Remove <YourDeleteTable> model from
models.py
file - Remove <YourDeleteTable> class from
admin.py
file and ALL other instances of wherever this class is used. python manage.py makemigrations <<your app>>
python manage.py migrate
Background
I wrote this guide because I lost all my data from following a different guide on Stack Overflow. T_T
Solutions to Additional Database Problems in Django
💖 💪 🙅 🚩
tieje
Posted on April 4, 2022
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.