/**
* Create the database schema
*
* Creates a new database schema based on the current mapping information.
*
* It expects the database to be empty, if tables that are to be created already
* exist, this will lead to errors.
*
* @param string $output A file to write SQL to, instead of executing it
* @return void
* @see neos.flow:doctrine:update
* @see neos.flow:doctrine:migrate
*/
public function createCommand($output = null)
{
if (!$this->isDatabaseConfigured()) {
$this->outputLine('Database schema creation has been SKIPPED, the driver and host backend options are not set in /Configuration/Settings.yaml.');
$this->quit(1);
}
$this->doctrineService->createSchema($output);
if ($output === null) {
$this->outputLine('Created database schema.');
} else {
$this->outputLine('Wrote schema creation SQL to file "' . $output . '".');
}
}