X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FCore%2FConsole%2FDatabaseStructure.php;h=1ec108d2e61cfd2f0d5d2fc07502b733ba3843b3;hb=3aa77685fcccff9739384136b4894de43200fa8c;hp=f3badc1969062485aa758744d28834fe8f7daeee;hpb=8a46c786f37550160d81e7b7ecbcacb4c9fff493;p=friendica.git diff --git a/src/Core/Console/DatabaseStructure.php b/src/Core/Console/DatabaseStructure.php index f3badc1969..1ec108d2e6 100644 --- a/src/Core/Console/DatabaseStructure.php +++ b/src/Core/Console/DatabaseStructure.php @@ -8,9 +8,6 @@ use Friendica\Database\DBA; use Friendica\Database\DBStructure; use RuntimeException; -require_once 'boot.php'; -require_once 'include/dba.php'; - /** * @brief Performs database updates from the command line * @@ -64,17 +61,19 @@ HELP; Core\Config::load(); + $a = get_app(); + switch ($this->getArgument(0)) { case "dryrun": - $output = DBStructure::update(true, false); + $output = DBStructure::update($a->getBasePath(), true, false); break; case "update": $force = $this->getOption(['f', 'force'], false); - $output = Update::run($force, true, false); + $output = Update::run($a->getBasePath(), $force, true, false); break; case "dumpsql": ob_start(); - DBStructure::printStructure(); + DBStructure::printStructure($a->getBasePath()); $output = ob_get_clean(); break; case "toinnodb": @@ -82,6 +81,8 @@ HELP; DBStructure::convertToInnoDB(); $output = ob_get_clean(); break; + default: + $output = 'Unknown command: ' . $this->getArgument(0); } $this->out($output);