Open juneeighteen opened 2 years ago
This seems bad, but as a proof of concept, I was able to get past the original issue by updating the initial migration to not drop and re-add the primary key field. I'm not sure what a better Django-ism way is to do this though:
https://github.com/Koed00/django-q/compare/master...agilesyndrome:master
This same problem happens with Titanium DB (TiDB) (https://en.wikipedia.org/wiki/TiDB).
MySQLdb._exceptions.OperationalError: (8200, 'Unsupported drop integer primary key')
Currently, Django-q does not run with Cockroach Labs as a database backend.
Steps to repeat:
manage.py migrate
You'll receive the error:
This seems to be because this migration attempts to drop the primary key, but CockroachDB won't allow that to happen: https://github.com/Koed00/django-q/blob/master/django_q/migrations/0003_auto_20150708_1326.py#L23-L25
My Django migration skills are not yet at ninja status 🥷 , but I'm looking for any potential ways to run the migration scripts without dropping the PK. Any ideas would be appreciated.