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 <[email protected]>        The highway is for gamblers,
San Francisco Bay Area, California    better use your sense - B. Dylan

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

This message sent to [email protected]

Reply via email to