Skip to content

Table prefix issue #44

@SabatinoMasala

Description

@SabatinoMasala

The table name returned by $model->getTable() is unprefixed, causing errors on the describe query if a table prefix is present.

$safeTableName = \DB::getQueryGrammar()->wrap($table);

This could be solved by adding the prefix manually:

$safeTableName = \DB::getQueryGrammar()->wrap($model->getConnection()->getTablePrefix() . $table);

I had this issue occur on an older Laravel version: 5.7

Not tested on anything newer.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions