cakephp / cakephp/phinx

dropTable() doesn't support table with a dot in its name

Open
#857 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug waiting on feedback
Dominant language
PHP
Stars
4.5k
Forks
884
PR merge metrics
No merged PRs in 30d

Description

hasTable() returns true but dropTable() throws this error:

[PDOException]
SQLSTATE[42S02]: Base table or view not found: 1051 Unknown table 'table_with.dot'

I assume the same problem occurs with having other characters in the table name too.

Note: I'm using the MySQL adapter.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by comparing how hasTable() and dropTable() handle identifiers in the MySQL adapter, reproducing the failure with a table name containing a dot. Check the existing database-related tests and add regression coverage for the corrected behavior. Done means dropTable() succeeds for the reported table name without breaking normal names.

Written by the indexing model from the issue text.

Assessment

Tech stack
mysql, php
Domain
databases
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.