The issue is caused by a new behavior in Mysql 8.4 that throws an error when you create a FK in table A to table B if Table B does not have a unique constraint.
SQLSTATE[HY000]: General error: 6125 Failed to add the foreign key constraint. Missing unique key for constraint 'FOREIGN_KEY' in the referenced table 'TABLE'
There is a workaround setting variable RESTRICT_FK_ON_NON_STANDARD_KEY to OFF (ON by default) but in the case of the unit tests it would be enough to create keys as unique.
Fixes #2277
The issue is caused by a new behavior in Mysql 8.4 that throws an error when you create a FK in table A to table B if Table B does not have a unique constraint.
There is a workaround setting variable RESTRICT_FK_ON_NON_STANDARD_KEY to OFF (ON by default) but in the case of the unit tests it would be enough to create keys as unique.
The report: https://bugs.mysql.com/bug.php?id=114838
@MasterOdin please let me know your thoughts