Skip to content

Remove db_constraint on TranslatedField as translations are not unique#24812

Draft
diox wants to merge 5 commits into
mozilla:masterfrom
diox:translations-remove-db-constraint
Draft

Remove db_constraint on TranslatedField as translations are not unique#24812
diox wants to merge 5 commits into
mozilla:masterfrom
diox:translations-remove-db-constraint

Conversation

@diox
Copy link
Copy Markdown
Member

@diox diox commented Apr 28, 2026

We have been using this quirky "feature" of MySQL that allows FKs to point to non-unique rows in the translations app for 15+ years, but MySQL 8.4 raises an error unless --skip-restrict-fk-on-non-standard-key is set. This parameter is not supported on GCP, so remove the constraints instead.

Unlocks mozilla/addons#15918

diox added 5 commits April 28, 2026 17:57
We have been using this quirky "feature" of MySQL that allows FKs to
point to non-unique rows in the translations app for 15+ years, but
MySQL 8.4 raises an error unless --skip-restrict-fk-on-non-standard-key
is set. This parameter is not supported on GCP, so remove the
constraints instead.
Comment thread docker-compose.yml
# Disable performance schema for faster startup
- --performance-schema=OFF
# Allow nonstandard FKs (needed for translations)
- --skip-restrict-fk-on-non-standard-key
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#24894 proves just removing --skip-restrict-fk-on-non-standard-key in MySQL 8.4 without the changes from this PR loudly fails in CI.

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

Successfully merging this pull request may close these issues.

1 participant