X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FConsole%2FDatabaseStructure.php;h=88f12476f5f90feb4f3c5a1d20086b77b4feef58;hb=9fbdcb5459e4acb158961427837612999253e046;hp=be301746c1ac3a3512cb2cb2a84b1dee796d49ed;hpb=24f8ee8e676abf4dd16916fd417562aca7bcbb9f;p=friendica.git diff --git a/src/Console/DatabaseStructure.php b/src/Console/DatabaseStructure.php index be301746c1..88f12476f5 100644 --- a/src/Console/DatabaseStructure.php +++ b/src/Console/DatabaseStructure.php @@ -1,6 +1,6 @@ dba = $dba; + $this->dbaDefinition = $dbaDefinition; + $this->viewDefinition = $viewDefinition; $this->configCache = $configCache; + $this->basePath = $basePath->getPath(); } - protected function doExecute() + protected function doExecute(): int { if ($this->getOption('v')) { $this->out('Class: ' . __CLASS__); @@ -120,10 +135,9 @@ HELP; $output = ob_get_clean(); break; case "dumpsql": - DBStructure::writeStructure(); - ob_start(); - DBStructure::printStructure($basePath); - $output = ob_get_clean(); + DocWriter::writeDbDefinition($this->dbaDefinition, $this->basePath); + $output = DbaDefinitionSqlWriter::create($this->dbaDefinition); + $output .= ViewDefinitionSqlWriter::create($this->viewDefinition); break; case "toinnodb": ob_start();