Is there a way to get better debugging information for foreign key violations in MySQL?
I'm using Phinx for database migration and I'm dealing with multiple constraints in a row and exception messages like these:
Integrity constraint violation: 1022 Can't write; duplicate key in table '#sql-1b8c_4534' in […]
This problem is obscured by a lack of foreign-key name as well as a temporary table name. Is there a way to switch to a more verbose mode or something?
Expanding the stack trace would help also, because now it looks like this, with truncated queries:
Stack trace:
#0 /home/user/work/project/vendor/robmorgan/phinx/src/Phinx/Db/Adapter/PdoAdapter.php(167): PDO->exec('ALTER TABLE `us...')
#1 /home/user/w[…]