You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
However, when generating a new schema with php artisan openapi:make-schema User -m User, it looks like the prefix field isn't being honoured as it should be, as I get this error message:
Doctrine\DBAL\Schema\SchemaException
There is no column with name 'id' on table 'users'.
at vendor/doctrine/dbal/src/Schema/SchemaException.php:87
83▕ * @return SchemaException
84▕ */
85▕ public static function columnDoesNotExist($columnName, $table)
86▕ {
➜ 87▕ return new self(
88▕ sprintf("There is no column with name '%s' on table '%s'.", $columnName, $table),
89▕ self::COLUMN_DOESNT_EXIST
90▕ );
91▕ }
+3 vendor frames
4 [internal]:0
Vyuldashev\LaravelOpenApi\Console\SchemaFactoryMakeCommand::Vyuldashev\LaravelOpenApi\Console\{closure}("id")
+17 vendor frames
22 artisan:37
Illuminate\Foundation\Console\Kernel::handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
My users table is actually prefixed with "auth_" so if it looked for "auth_users" it would find the correct structure.
I've looked at the code to see if I can submit a PR for this, but I can't seem to find on a quick glance, where that table name is set within the code.
The text was updated successfully, but these errors were encountered:
harveydobson
pushed a commit
to harveydobson/laravel-openapi
that referenced
this issue
May 12, 2022
Within Laravel's
config/database.php
file, there is an option to add a prefix to database table names.My MySQL config for example (defualt prefix is '') :
However, when generating a new schema with
php artisan openapi:make-schema User -m User
, it looks like the prefix field isn't being honoured as it should be, as I get this error message:My users table is actually prefixed with "auth_" so if it looked for "auth_users" it would find the correct structure.
I've looked at the code to see if I can submit a PR for this, but I can't seem to find on a quick glance, where that table name is set within the code.
The text was updated successfully, but these errors were encountered: