You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Migrations aren't working for MySQL 8.4. Error occurs during creation telegram_update table:
Fatal error: Uncaught PDOException: SQLSTATE[HY000]: General error: 6125 Failed to add the foreign key constraint. Missing unique key for constraint 'telegram_update_ibfk_11' in the referenced table 'poll_answer' in /app/vendor/illuminate/database/Connection.php:587
Everything works well if I use MySQL version 8.3, so I'm supposing that database developers changed something and now migrations stopped working.
Current behaviour
Migrations crashing.
How to reproduce
Apply migration in MySQL 8.4.
Expected behaviour
Migrations finish successfully.
The text was updated successfully, but these errors were encountered:
SET GLOBAL restrict_fk_on_non_standard_key = 'OFF'
This is because
Nonstandard foreign keys. The use of non-unique or partial keys as foreign keys is nonstandard, and is deprecated in MySQL. Beginning with MySQL 8.4.0, you must explicitly enable such keys by setting restrict_fk_on_non_standard_key to OFF, or by starting the server with --skip-restrict-fk-on-non-standard-key.
restrict_fk_on_non_standard_key is ON by default, which means that trying to use a nonstandard key as a foreign key in a CREATE TABLE or other SQL statement is rejected with ER_WARN_DEPRECATED_NON_STANDARD_KEY. Setting it to ON allows such statements to run, but they raise the same error as a warning.
🐞 Bug Report
Required Information
Summary
Migrations aren't working for MySQL 8.4. Error occurs during creation
telegram_update
table:Everything works well if I use MySQL version 8.3, so I'm supposing that database developers changed something and now migrations stopped working.
Current behaviour
Migrations crashing.
How to reproduce
Apply migration in MySQL 8.4.
Expected behaviour
Migrations finish successfully.
The text was updated successfully, but these errors were encountered: