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

Add migrate:install to white listed commands #136

Closed
michaelhume opened this issue Nov 27, 2021 · 1 comment
Closed

Add migrate:install to white listed commands #136

michaelhume opened this issue Nov 27, 2021 · 1 comment

Comments

@michaelhume
Copy link
Contributor

michaelhume commented Nov 27, 2021

Hi,

Since the migrate command depends on migrate:install in order to prepare the database when first run, if running code that executes a call to migrate within tinker (on a fresh db) a Symfony/Component/Console/Exception/NamespaceNotFoundException with message 'There are no commands defined in the "migrate" namespace.' is the result.

Adding migrate:install to the whitelisted commands resolves this.

N.B. Adding \Illuminate\Database\Console\Migrations\InstallCommand::class to config/tinker.php results in a BindingResolutionException: Target [Illuminate\Database\Migrations\MigrationRepositoryInterface] is not instantiable while building [Illuminate\Database\Console\Migrations\InstallCommand].

Thanks for all you do!

@driesvints
Copy link
Member

I don't think this belongs in that list but you can always attempt a pr to see if Taylor would accept it. Thanks

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

2 participants