Show query on error
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 4.5k
- Forks
- 884
- PR merge metrics
- No merged PRs in 30d
Description
I'm use up() / down() methods and couple execute() in one migration. On error phinx print nice message like SQLSTATE[HY000]: General error: 1359 Trigger already exists or SQLSTATE[42S22]: Column not found: 1054 Unknown column 'title_id' in 'NEW' but if I add over 50 triggers...
(only way is make database dump and find error place)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the issue with a migration using up()/down() and multiple execute() calls, including more than 50 triggers. Trace how Phinx reports the SQLSTATE error and identify where the executed query is available. Done means the failing query is included in the error output so the problematic trigger can be found without a database dump.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- databases
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100