I'm having an issue with migrating my Django application.
I encounter the following errors when trying to migrate:
ERRORS:
accounts.Availability.channel: (fields.E300) Field defines a relation with model 'Channel', which is either not installed, or is abstract.
accounts.Correspondence.channel: (fields.E300) Field defines a relation with model 'Channel', which is either not installed, or is abstract.
accounts.Todo.channel: (fields.E300) Field defines a relation with model 'Channel', which is either not installed, or is abstract.
marketplace.Deliverable.channel: (fields.E300) Field defines a relation with model 'Channel', which is either not installed, or is abstract.
marketplace.OfflineServiceRequest.channel: (fields.E300) Field defines a relation with model 'Channel', which is either not installed, or is abstract.
marketplace.OperatorReview.channel: (fields.E300) Field defines a relation with model 'Channel', which is either not installed, or is abstract.
marketplace.Service.channel: (fields.E300) Field defines a relation with model 'Channel', which is either not installed, or is abstract.
marketplace.ServiceDelivery.channel: (fields.E300) Field defines a relation with model 'Channel', which is either not installed, or is abstract.
My installed apps definition:
DJANGO_APPS = [
'suit',
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'django.contrib.sites',
]
LOCAL_APPS = [
'thriive_api.accounts',
'thriive_api.utils',
'thriive_api.marketplace',
'thriive_api.conversations',
'thriive_api.transactions'
]
THIRDPARTY_APPS = [
'rest_framework_jwt',
'rest_framework',
'charity_check',
'restframework_stripe',
'redis_pubsub',
]
INSTALLED_APPS = DJANGO_APPS + THIRDPARTY_APPS + LOCAL_APPS
and I'm referring to the model directly in the FK relation in my model definitions:
from redis_pubsub.models import Channel
class Availability(models.Model):
channel = models.ForeignKey(Channel)
It seems like the migrations can't find the `redis_pubsub.Channel` model, which is installed in `THIRDPARTY_APPS` and is not abstract. The migration files themselves also refer to the correct model path (e.g. `redis_pubsub.Channel`), so what gives? Does anyone know what's going on here?