We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

Error: SQLSTATE[HY000]: General error: 1215 Cannot add foreign key constraint

when I use php bin/console.php migration generate --migrations=migrations devtools says "Success: Version 1.0.2 was successfully generated " and It work very good, but when My team's other people use php bin/console.php migration run --migrations=migrations it catch an error like this "Error: SQLSTATE[HY000]: General error: 1215 Cannot add foreign key constraint", the phalcon version1.2.4 get this error,It can't migration run with foreign key?



98.9k

There is no need to create the issue two times.