A deploy fails because a foreign key references columns that are not covered by a unique key.
A deploy request can fail before copying starts because a foreign key constraint references columns on the parent table that are not covered by a unique key:
Failed to add the foreign key constraint. Missing unique key for constraint 'fk_assessments_group' in the referenced table 'student_groups' (errno 6125) (sqlstate HY000)
MySQL 8.0 allowed a foreign key to reference any indexed column, even when the index was not unique or the foreign key covered only a prefix of it. MySQL 8.4 rejects both by default. The referenced columns must be the PRIMARY KEY or a UNIQUE key on exactly those columns.
Add a unique key on the referenced columns of the parent table, then deploy again:
ALTER TABLE student_groups ADD UNIQUE KEY uniq_student_groups_id (id);
If the referenced column is not unique by design, point the foreign key at the parent table’s primary key instead, or drop the constraint and enforce the relationship in your application. See Strategies for maintaining referential integrity.Make the change on your branch, then open a new deploy request. If the failed deploy is still in progress, cancel it first.