On 3/3/25 07:52, Stefan Bauer via Mailman-users wrote:

trying to update mailman3 to lastest version, we fail during

mailman-web migrate with:

Operations to perform:
Apply all migrations: account, admin, auth, contenttypes, django_mailman3,
django_q, hyperkitty, postorius, sessions, sites, socialaccount
Running migrations:
Applying account.0006_emailaddress_lower...Traceback (most recent call
last):
File
"/opt/mailman/venv/lib/python3.10/site-packages/django/db/backends/utils.py",
line 89, in _execute
return self.cursor.execute(sql, params)
File
"/opt/mailman/venv/lib/python3.10/site-packages/django/db/backends/sqlite3/base.py",
line 328, in execute
return super().execute(query, params)
sqlite3.IntegrityError: UNIQUE constraint failed: account_emailaddress.email


This issue is due to changes in Django allauth to prevent creating multiple addresses differing only in case. The problem is if you have such multiple addresses in your account_emailaddress table, this migration fails. There is a script at https://www.msapiro.net/scripts/UC_fix that will fix this. You may need to adjust the shebang and replace psycopg2 with sqlite3.

See https://github.com/pennersr/django-allauth/issues/3019 perhaps starting at https://github.com/pennersr/django-allauth/issues/3019#issuecomment-1748028271

We found a workaround to fake the migration with

migrate --fake

You should fix the issue with the DB and run the migrations.

Could this be some duplicate users with same mail-address?

This is not related to Mailman users. It is Django users.

--
Mark Sapiro <m...@msapiro.net>        The highway is for gamblers,
San Francisco Bay Area, California    better use your sense - B. Dylan

_______________________________________________
Mailman-users mailing list -- mailman-users@mailman3.org
To unsubscribe send an email to mailman-users-le...@mailman3.org
https://lists.mailman3.org/mailman3/lists/mailman-users.mailman3.org/
Archived at: 
https://lists.mailman3.org/archives/list/mailman-users@mailman3.org/message/OUORZPB5XXMZ2UPUVBFEAYZNMY33MUUT/

This message sent to arch...@mail-archive.com

Reply via email to