[GH-ISSUE #1258] Upgrading 1.6 -> 1.9 SQL relation models missing #1023

Closed
opened 2026-02-27 11:14:47 +03:00 by kerem · 8 comments
Owner

Originally created by @prisma01 on GitHub (Sep 29, 2017).
Original GitHub issue: https://github.com/modoboa/modoboa/issues/1258

When upgrading from 1.6 to 1.9 following the upgrade instructions i'm got stuck:
When i run:

python manage.py migrate

I get:

SystemCheckError: System check identified some issues:

ERRORS:
limits.DomainObjectLimit.domain: (fields.E300) Field defines a relation with model 'Domain', which is >either not installed, or is abstract.
modoboa.MXRecord.domain: (fields.E300) Field defines a relation with model 'Domain', which is >either not installed, or is abstract.
modoboa_dmarc.Record.header_from: (fields.E300) Field defines a relation with model 'Domain', >which is either not installed, or is abstract.
modoboa_imap_migration.Migration.mailbox: (fields.E300) Field defines a relation with model >'Mailbox', which is either not installed, or is abstract.
modoboa_postfix_autoreply.ARmessage.mbox: (fields.E300) Field defines a relation with model >'Mailbox', which is either not installed, or is abstract.
modoboa_radicale.AccessRule.mailbox: (fields.E300) Field defines a relation with model 'Mailbox', >which is either not installed, or is abstract.
modoboa_radicale.SharedCalendar.domain: (fields.E300) Field defines a relation with model >'Domain', which is either not installed, or is abstract.
modoboa_radicale.UserCalendar.mailbox: (fields.E300) Field defines a relation with model 'Mailbox', >which is either not installed, or is abstract.
relaydomains.RelayDomain.domain: (fields.E300) Field defines a relation with model 'Domain', which >is either not installed, or is abstract.

Extensions and all external packages should be up to date:

pip list| grep modoboa

modoboa (1.9.0)
modoboa-amavis (1.1.3)
modoboa-contacts (0.4.0)
modoboa-dmarc (1.0.1)
modoboa-imap-migration (1.1.1)
modoboa-pdfcredentials (1.1.3)
modoboa-postfix-autoreply (1.2.1)
modoboa-radicale (1.1.0)
modoboa-sievefilters (1.1.1)
modoboa-stats (1.2.2)
modoboa-webmail (1.2.0)

Host is debian jessie, python 2.7
Did I miss anything? Or is there a simple way to readd Domain and Mailbox Modell?

Originally created by @prisma01 on GitHub (Sep 29, 2017). Original GitHub issue: https://github.com/modoboa/modoboa/issues/1258 When upgrading from 1.6 to 1.9 following the upgrade instructions i'm got stuck: When i run: > python manage.py migrate I get: > SystemCheckError: System check identified some issues: > >ERRORS: >limits.DomainObjectLimit.domain: (fields.E300) Field defines a relation with model 'Domain', which is >either not installed, or is abstract. >modoboa.MXRecord.domain: (fields.E300) Field defines a relation with model 'Domain', which is >either not installed, or is abstract. >modoboa_dmarc.Record.header_from: (fields.E300) Field defines a relation with model 'Domain', >which is either not installed, or is abstract. >modoboa_imap_migration.Migration.mailbox: (fields.E300) Field defines a relation with model >'Mailbox', which is either not installed, or is abstract. >modoboa_postfix_autoreply.ARmessage.mbox: (fields.E300) Field defines a relation with model >'Mailbox', which is either not installed, or is abstract. >modoboa_radicale.AccessRule.mailbox: (fields.E300) Field defines a relation with model 'Mailbox', >which is either not installed, or is abstract. >modoboa_radicale.SharedCalendar.domain: (fields.E300) Field defines a relation with model >'Domain', which is either not installed, or is abstract. >modoboa_radicale.UserCalendar.mailbox: (fields.E300) Field defines a relation with model 'Mailbox', >which is either not installed, or is abstract. >relaydomains.RelayDomain.domain: (fields.E300) Field defines a relation with model 'Domain', which >is either not installed, or is abstract. Extensions and all external packages should be up to date: >pip list| grep modoboa >modoboa (1.9.0) >modoboa-amavis (1.1.3) >modoboa-contacts (0.4.0) >modoboa-dmarc (1.0.1) >modoboa-imap-migration (1.1.1) >modoboa-pdfcredentials (1.1.3) >modoboa-postfix-autoreply (1.2.1) >modoboa-radicale (1.1.0) >modoboa-sievefilters (1.1.1) >modoboa-stats (1.2.2) >modoboa-webmail (1.2.0) Host is debian jessie, python 2.7 Did I miss anything? Or is there a simple way to readd Domain and Mailbox Modell?
kerem 2026-02-27 11:14:47 +03:00
Author
Owner

@tonioo commented on GitHub (Oct 2, 2017):

Those models are provided by the modoboa package, I think your virtualenv is somewhat broken. Have you tried to recreate it?

<!-- gh-comment-id:333573299 --> @tonioo commented on GitHub (Oct 2, 2017): Those models are provided by the modoboa package, I think your virtualenv is somewhat broken. Have you tried to recreate it?
Author
Owner

@prisma01 commented on GitHub (Oct 2, 2017):

Hm,
thanks for mentioning virtualenv. I was using pip right away. I purged everything using
pip freeze | xargs pip uninstall -y
then I was adding a virtualenv in the modoboa homedir. Installing modoboa in the virtualenv did work after some effort :-)
But when i call
python manage.py migrate
i get the same error (extensions disabled):
(env)modoboa@mail:~$ python manage.py migrate

SystemCheckError: System check identified some issues:

ERRORS:
limits.DomainObjectLimit.domain: (fields.E300) Field defines a relation with model 'Domain', which is either not installed, or is abstract.
modoboa.MXRecord.domain: (fields.E300) Field defines a relation with model 'Domain', which is either not installed, or is abstract.
relaydomains.RelayDomain.domain: (fields.E300) Field defines a relation with model 'Domain', which is either not installed, or is abstract.

<!-- gh-comment-id:333628252 --> @prisma01 commented on GitHub (Oct 2, 2017): Hm, thanks for mentioning virtualenv. I was using pip right away. I purged everything using `pip freeze | xargs pip uninstall -y` then I was adding a virtualenv in the modoboa homedir. Installing modoboa in the virtualenv did work after some effort :-) But when i call `python manage.py migrate` i get the same error (extensions disabled): (env)modoboa@mail:~$ python manage.py migrate > SystemCheckError: System check identified some issues: > ERRORS: > limits.DomainObjectLimit.domain: (fields.E300) Field defines a relation with model 'Domain', which is either not installed, or is abstract. > modoboa.MXRecord.domain: (fields.E300) Field defines a relation with model 'Domain', which is either not installed, or is abstract. > relaydomains.RelayDomain.domain: (fields.E300) Field defines a relation with model 'Domain', which is either not installed, or is abstract.
Author
Owner

@tonioo commented on GitHub (Oct 6, 2017):

Looks like some packages are still missing. Can you paste the result of a pip list command ran into you venv?

<!-- gh-comment-id:334803984 --> @tonioo commented on GitHub (Oct 6, 2017): Looks like some packages are still missing. Can you paste the result of a ``pip list`` command ran into you venv?
Author
Owner

@prisma01 commented on GitHub (Oct 6, 2017):

Shouldn't the dependencies be resolved by pip?
However I had to install django-rest-swagger and MySQL-python as python manage.py migrate said they were missing.
This is my list of packages in my virtualenv:

argparse (1.2.1)
asn1crypto (0.23.0)
bcrypt (3.1.3)
certifi (2017.7.27.1)
cffi (1.11.1)
chardet (3.0.4)
click (6.7)
coreapi (2.3.1)
coreapi-cli (1.0.6)
coreschema (0.0.4)
cryptography (2.0.3)
dj-database-url (0.4.2)
Django (1.10.8)
django-ckeditor (5.2.1)
django-filter (1.0.4)
django-rest-swagger (2.1.2)
django-reversion (1.10.2)
django-subcommand2 (0.1.1)
django-versionfield2 (0.5.0)
django-webpack-loader (0.5.0)
django-xforwardedfor-middleware (2.0)
djangorestframework (3.6.3)
dnspython (1.15.0)
enum34 (1.1.6)
feedparser (5.2.1)
future (0.16.0)
futures (3.1.1)
gevent (1.2.1)
greenlet (0.4.12)
idna (2.6)
ipaddress (1.0.18)
itypes (1.1.0)
Jinja2 (2.9.6)
jsonfield (1.0.3)
LEPL (5.1.3)
lxml (4.0.0)
MarkupSafe (1.0)
modoboa (1.9.0)
modoboa-amavis (1.1.3)
modoboa-contacts (0.4.0)
modoboa-dmarc (1.0.1)
modoboa-imap-migration (1.1.1)
modoboa-pdfcredentials (1.2.1)
modoboa-postfix-autoreply (1.2.1)
modoboa-radicale (1.1.0)
modoboa-sievefilters (1.1.1)
modoboa-stats (1.2.2)
modoboa-webmail (1.2.1)
MySQL-python (1.2.5)
olefile (0.44)
openapi-codec (1.3.2)
passlib (1.7.1)
Pillow (4.3.0)
pip (1.5.6)
progressbar33 (2.4)
py-dateutil (2.2)
pycparser (2.18)
pytz (2017.2)
reportlab (3.4.0)
requests (2.18.4)
requests-file (1.4.2)
rfc6266 (0.0.4)
rrdtool (0.1.11)
setuptools (5.5.1)
sievelib (0.9.2)
simplejson (3.11.1)
six (1.11.0)
tldextract (2.1.0)
uritemplate (3.0.0)
urllib3 (1.22)
wsgiref (0.1.2)

Thank you for helping me out...

<!-- gh-comment-id:334833728 --> @prisma01 commented on GitHub (Oct 6, 2017): Shouldn't the dependencies be resolved by pip? However I had to install django-rest-swagger and MySQL-python as python manage.py migrate said they were missing. This is my list of packages in my virtualenv: ``` argparse (1.2.1) asn1crypto (0.23.0) bcrypt (3.1.3) certifi (2017.7.27.1) cffi (1.11.1) chardet (3.0.4) click (6.7) coreapi (2.3.1) coreapi-cli (1.0.6) coreschema (0.0.4) cryptography (2.0.3) dj-database-url (0.4.2) Django (1.10.8) django-ckeditor (5.2.1) django-filter (1.0.4) django-rest-swagger (2.1.2) django-reversion (1.10.2) django-subcommand2 (0.1.1) django-versionfield2 (0.5.0) django-webpack-loader (0.5.0) django-xforwardedfor-middleware (2.0) djangorestframework (3.6.3) dnspython (1.15.0) enum34 (1.1.6) feedparser (5.2.1) future (0.16.0) futures (3.1.1) gevent (1.2.1) greenlet (0.4.12) idna (2.6) ipaddress (1.0.18) itypes (1.1.0) Jinja2 (2.9.6) jsonfield (1.0.3) LEPL (5.1.3) lxml (4.0.0) MarkupSafe (1.0) modoboa (1.9.0) modoboa-amavis (1.1.3) modoboa-contacts (0.4.0) modoboa-dmarc (1.0.1) modoboa-imap-migration (1.1.1) modoboa-pdfcredentials (1.2.1) modoboa-postfix-autoreply (1.2.1) modoboa-radicale (1.1.0) modoboa-sievefilters (1.1.1) modoboa-stats (1.2.2) modoboa-webmail (1.2.1) MySQL-python (1.2.5) olefile (0.44) openapi-codec (1.3.2) passlib (1.7.1) Pillow (4.3.0) pip (1.5.6) progressbar33 (2.4) py-dateutil (2.2) pycparser (2.18) pytz (2017.2) reportlab (3.4.0) requests (2.18.4) requests-file (1.4.2) rfc6266 (0.0.4) rrdtool (0.1.11) setuptools (5.5.1) sievelib (0.9.2) simplejson (3.11.1) six (1.11.0) tldextract (2.1.0) uritemplate (3.0.0) urllib3 (1.22) wsgiref (0.1.2) ``` Thank you for helping me out...
Author
Owner

@tonioo commented on GitHub (Oct 7, 2017):

They should be resolved but I think you did a little mistake while updating... Does everything work as expected now?

<!-- gh-comment-id:334955542 --> @tonioo commented on GitHub (Oct 7, 2017): They should be resolved but I think you did a little mistake while updating... Does everything work as expected now?
Author
Owner

@prisma01 commented on GitHub (Oct 9, 2017):

No, It is unfortunately not solved. It might be, that I made a mistake but i double checked with the upgrading Documentation and I have not found anything that is not correct.
As a last resort, giving up on upgrading I removed the instance now an tried to create a new instance.
But I kept the DB, as I want to keep my Mail configuration. But during deploying the new instance I get the following error:
django.db.utils.IntegrityError: (1062, "Duplicate entry '@XXX.org' for key 'email'")
Is there another way of "manually upgrading"?

<!-- gh-comment-id:335160891 --> @prisma01 commented on GitHub (Oct 9, 2017): No, It is unfortunately not solved. It might be, that I made a mistake but i double checked with the upgrading Documentation and I have not found anything that is not correct. As a last resort, giving up on upgrading I removed the instance now an tried to create a new instance. But I kept the DB, as I want to keep my Mail configuration. But during deploying the new instance I get the following error: django.db.utils.IntegrityError: (1062, "Duplicate entry '@XXX.org' for key 'email'") Is there another way of "manually upgrading"?
Author
Owner

@tonioo commented on GitHub (Oct 10, 2017):

@prisma01 A complete trace would be useful.

<!-- gh-comment-id:335508381 --> @tonioo commented on GitHub (Oct 10, 2017): @prisma01 A complete trace would be useful.
Author
Owner

@prisma01 commented on GitHub (Oct 15, 2017):

As this issue is no longer about upgrading but about reinstall, i'll close this. Install issue moved to #1276

<!-- gh-comment-id:336729071 --> @prisma01 commented on GitHub (Oct 15, 2017): As this issue is no longer about upgrading but about reinstall, i'll close this. Install issue moved to #1276
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/modoboa-modoboa#1023
No description provided.