Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sometimes Doctrine\DBAL\Driver\PDOException::("SQLSTATE[HY000] [1049] Unknown database 'laravel'") #142

Open
renepardon opened this issue Dec 16, 2019 · 0 comments

Comments

@renepardon
Copy link

Environment:

  • Laravel-Code-Generator Version: 2.4
  • Laravel Version: 6.2

Description:

Sometimes when executing php artisan create:api-scaffold, I receive the error:

Doctrine\DBAL\Driver\PDOException::("SQLSTATE[HY000] [1049] Unknown database 'laravel'")

Of course the .env file contains real database credentials and a name other than "laravel". I don't even know why the codegen tries to access the database because I don't use the --table-exists flag.

Steps/Commands To Reproduce:

Fresh laravel installation, fresh codegen installation - go for it :)

php artisan create:api-scaffold \
--with-form-request \
--with-auth \
--with-soft-delete \
--with-migration \
--translation-for=de,en \
--language-filename=media_category_i18n \
--table-name=media_category_i18ns \
--fields=id,media_category_id,name \
MediaCategoryI18n

Content Of The Resource-File:

private project!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant