Friday, December 9, 2016

migrating a model from concrete inheritance to abstract inheritance

Hello,

on django 1.8.17 i'm trying to convert a model Format away from inheriting from a concrete model DryModel and i get this running a migration that adds the id field:

django.core.exceptions.FieldError: Local field u'id' in class 'Format' clashes with field of similar name from base class 'DryModel'

I've already removed the pointer to DryModel in another migration. So migrations thinks my model is still inheriting from DryModel while if i open a shell and print the bases of format i correctly get:

In [2]: Format.__bases__
Out[2]: (myapp.models.AbstractModel,)

Any hint on how to handle that?

Thanks,
Riccardo Magliocchetti

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/98f59a44-50dd-469c-8e93-74878ca64634%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment