Fixed issue when no dbname provided in the DSN
This commit is contained in:
parent
26069a0d71
commit
c0221a604e
3 changed files with 18 additions and 3 deletions
|
|
@ -45,7 +45,12 @@ class DatabaseCreateCommand extends AbstractPropelCommand
|
|||
|
||||
list($name, $config) = $this->getConnection($input, $output);
|
||||
$dbName = $this->parseDbName($config['connection']['dsn']);
|
||||
$query = 'CREATE DATABASE '. $dbName .';';
|
||||
|
||||
if (null === $dbName) {
|
||||
return $output->writeln('<error>No database name found.</error>');
|
||||
} else {
|
||||
$query = 'CREATE DATABASE '. $dbName .';';
|
||||
}
|
||||
|
||||
try {
|
||||
\Propel::setConfiguration($this->getTemporaryConfiguration($name, $config));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue