Rename table instruction for postgres uses quoteColumnName
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 4.5k
- Forks
- 884
- PR merge metrics
- No merged PRs in 30d
Description
Something I noticed while fixing #1851, but did not have time to investigate on writing a testcase for it, so making an issue so as to not lose track of it.
The getRenameTableInstructions for the postgres adapter has the following definition:
On line 358, we are using quoteColumnName instead of quoteTableName. This will probably end up doing something unexpected if using a table name with schema. A test should probably be written to verify if that instruction breaks under current conditions and is fixed once that instruction is changed to quoteTableName.
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
Start in src/Phinx/Db/Adapter/PostgresAdapter.php at getRenameTableInstructions and inspect the referenced line using quoteColumnName. Add or locate a PostgreSQL adapter test covering a table name with a schema, then verify the generated rename instruction uses the table-name quoting behavior and the test passes.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php, postgres
- Domain
- databases
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- Half a day
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100