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

Referencing column 'attribute_id' and referenced column 'id' in foreign key constraint 'FK38EE09DA47B0D087' are incompatible. #2281

Open
jmiranda opened this issue Mar 16, 2021 · 0 comments
Labels
type: bug Addresses unintended behaviours of the app

Comments

@jmiranda
Copy link
Member

New tables created use the default charset utf8mb4 https://mysqlserverteam.com/new-defaults-in-mysql-8-0/ which is an issue because foreign key creates a reference from a column in the new table in utf8mb4 to an old table in utf8 leads to the following exception https://sentry.io/organizations/openboxes/issues/2223678608/?project=52447&query=is%3Aunresolved+incompatible&statsPeriod=14d

Error executing SQL ALTER TABLE `openboxes_demo`.`attribute_entity_type_codes` ADD CONSTRAINT `FK38EE09DA47B0D087` FOREIGN KEY (`attribute_id`) REFERENCES `openboxes_demo`.`attribute`(`id`):
          Caused By: Referencing column 'attribute_id' and referenced column 'id' in foreign key constraint 'FK38EE09DA47B0D087' are incompatible.
@jmiranda jmiranda added the type: bug Addresses unintended behaviours of the app label Mar 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Addresses unintended behaviours of the app
Projects
None yet
Development

No branches or pull requests

1 participant