django-wiki / django-nyt

Notification system for Django with batteries included: Email digests, user settings, JSON API
Apache License 2.0
144 stars 47 forks source link

Database integrity error #30

Closed zaksmolen closed 7 years ago

zaksmolen commented 7 years ago

I am trying to use a django app that has django-nyt as one of its dependencies. When trying to do the first migration, I get a django.db.utils.IntegrityError: (1215, 'Cannot add foreign key constraint') in the django_nyt.0001_initial migration. Anyone ever seen this?

zaksmolen commented 7 years ago

It seems like django_nyt requires MYISAM engine on the MySQL tables... I was able to get around this in a hacky way, at least locally, but that's not great and I'm not sure if I'll be able to deploy...

benjaoming commented 7 years ago

You would have to provide better tracebacks if you want someone to debug this. It's impossible to guess which foreign key is causing this from the above.

I don't think anything in django-nyt requires MYISAM, but using this engine will certainly just stop having foreign key constraints all together :)

For instance, it works fine with a proper database like Postgres :P