Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allauth upgrade issue: MariaDB does not support unique constraints with conditions #825

Open
2 tasks
jmcarson opened this issue Nov 8, 2024 · 1 comment
Open
2 tasks
Assignees

Comments

@jmcarson
Copy link
Collaborator

jmcarson commented Nov 8, 2024

When deploying the upgrade to allauth we saw the following warning:

WARNINGS:
account.EmailAddress: (models.W036) MariaDB does not support unique constraints with conditions.
HINT: A constraint won't be created. Silence this warning if you don't care about it.

Info in allauth ticket here: pennersr/django-allauth#3385 unfortunately just suggests upgrading to postgres

After reading through the various tickets I don't think that this would necessarily affect our sites in an adverse fashion, but there are a couple things we can do:

  • Capture warnings that occur during migrate in our ci
  • Handle this warning after further review of the issue and it's impact
@jmcarson jmcarson self-assigned this Nov 8, 2024
@jmcarson
Copy link
Collaborator Author

It is difficult to capture the warnings as part of our current testing as they actually occur as part of the 'check' framework in django. You can recreate by running the following which happens prior to migrations when you run migrate:
manage.py check --database default

We can add this to our ci with the additional flag --fail-level WARNING

Then we could silence the warning by adding it to the SILENCED_SYSTEM_CHECKS list in the django config. Downsides are if this particular warning occurs due to some other change we will have silenced the warning already (as you cannot be more granular in what you silence).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant