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

eloquent:migrate:fresh command fail without --database parameter #131

Open
hyde1 opened this issue Aug 1, 2022 · 0 comments
Open

eloquent:migrate:fresh command fail without --database parameter #131

hyde1 opened this issue Aug 1, 2022 · 0 comments

Comments

@hyde1
Copy link

hyde1 commented Aug 1, 2022

Hello,

Version: 2.2.1

Using the command bin/console eloquent:migrate:fresh without any paramter leads to an error whereas the help output says we can use it without any parameter: eloquent:migrate:fresh [--database DATABASE] [--force] [--path PATH] [--seed] [--seeder SEEDER]

$ bin/console eloquent:migrate:fresh                                                                                                                                                           
[critical] Error thrown while running command "eloquent:migrate:fresh". Message: "WouterJ\EloquentBundle\Command\MigrateFreshCommand::dropAllTables(): Argument #1 ($database) must be of type string, null given, called in /Volumes/Projects/customers-service/vendor/wouterj/eloquent-bundle/src/Command/MigrateFreshCommand.php on line 58"


In MigrateFreshCommand.php line 79:
                                                                                                                                                                                                                                          
  WouterJ\EloquentBundle\Command\MigrateFreshCommand::dropAllTables(): Argument #1 ($database) must be of type string, null given, called in /Volumes/Projects/customers-service/vendor/wouterj/eloquent-bundle/src/Command/MigrateFresh  
  Command.php on line 58                                                                                                                                                                                                                  
                                                                                                                                                                                                                                          

eloquent:migrate:fresh [--database DATABASE] [--force] [--path PATH] [--seed] [--seeder SEEDER]

If you provide the --database default parameter it throw another error saying that --path is required.
The workaround is to force the --database DATABASE AND --path PATH paramters but I think both should be optional.

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

1 participant