Skip to content

php bin/console doctrine:database:create does not workΒ #35

@mrpavlikov

Description

@mrpavlikov

Symfony 5.0.2

$ php bin/console doctrine:database:create

throws exception

In Driver.php line 54:
  Connection parameter `dbname` is required                                               

As far as I can see vendor/doctrine/doctrine-bundle/Command/CreateDatabaseDoctrineCommand.php:86 unsets dbname to check whether db exists and connects without driver:

// Need to get rid of _every_ occurrence of dbname from connection configuration and we have already extracted all relevant info from url
unset($params['dbname'], $params['path'], $params['url']);

$tmpConnection = DriverManager::getConnection($params);
$tmpConnection->connect($input->getOption('shard'));
$shouldNotCreateDatabase = $ifNotExists && in_array($name, $tmpConnection->getSchemaManager()->listDatabases());

but \FOD\DBALClickHouse\Driver::connect does not let that.

if (! isset($params['dbname'])) {
     throw new ClickHouseException('Connection parameter `dbname` is required');
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions