Skip to content

Command database-query doesn't respect mysql prefix correctly #316

@braseidon

Description

@braseidon

Laravel Package Version

1.4

Laravel Version

12.35.1

PHP Version

8.4.13

System Info

Windows 11, Herd, Claude Code

Description

Hi. When Claude Code queries the database using database-query, it gives a MySQL error. This is because my app uses a MySQL prefix for its tables. The query is using a period instead of an underscore for the prefix.

My config/database.php:

return [
        'mysql' => [
            'prefix' => 'arpg_',
        ],
];

And the database query:

laravel-boost - database-query (MCP)(query: "SELECT * FROM poe1_leagues ORDER BY startAt DESC LIMIT 5")
  ⎿  Error: Query failed: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'arpg.poe1_leagues' doesn't exist (Connection: mysql, SQL: SELECT * FROM poe1_leagues ORDER BY startAt DESC LIMIT 5)

Steps To Reproduce

Use a prefix for MySQL tables using an underscore prefix_ and then have Claude query the database.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions