Search code examples
pythonmysqldjangodatabasemodels

How to delete a Django model without deleting the table


How can I delete a Django model without effecting the table it works with.

Previously we've used the model and table normally but have since moved the models functionality to a microservice which still operates on the same table.


Solution

  • You can rename your sql table and then delete the model and then rename back.