Skip to content

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

@hyde1

Description

@hyde1

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

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