vintasoftware / django-zombodb

Easy Django integration with Elasticsearch through ZomboDB Postgres Extension
https://django-zombodb.readthedocs.io
MIT License
149 stars 10 forks source link

Created row Type isn't deleted if whole model is deleted #1

Open fjsj opened 5 years ago

fjsj commented 5 years ago

Steps to reproduce:

  1. Remove whole model from models.py
  2. makemigrations
  3. migrate
  4. migrate back to migration number before deletion
  5. Error here: django.db.utils.ProgrammingError: type "restaurants_name_016c1c_zombodb_row_type" already exists

For now, solution is to make a custom database backend engine, like https://github.com/SectorLabs/django-postgres-extra. Then, in the custom backend, implement something like SpatialiteSchemaEditor.delete_model.

We won't fix this now since we want an easier to configure API and this is a low impact issue.