X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FCore%2FConsole%2FDatabaseStructure.php;h=dededa9b3a4321e09fcd3ea31ea6d07c6f026b07;hb=11e39da6ccd4ff86be95de6af9e6f84ca67996d9;hp=47e6af5eb1f508efa63a41d6ffca59e3c0c7cff0;hpb=7efde8e334d6ca52fd1608fb9a78babcea4bdc9f;p=friendica.git diff --git a/src/Core/Console/DatabaseStructure.php b/src/Core/Console/DatabaseStructure.php index 47e6af5eb1..dededa9b3a 100644 --- a/src/Core/Console/DatabaseStructure.php +++ b/src/Core/Console/DatabaseStructure.php @@ -31,9 +31,10 @@ Commands toinnodb Convert all tables from MyISAM to InnoDB Options - -h|--help|-? Show help information - -v Show more debug information. - -f|--force Force the command in case of "update" (Ignore failed updates/running updates) + -h|--help|-? Show help information + -v Show more debug information. + -f|--force Force the update command (Even if the database structure matches) + -o|--override Override running or stalling updates HELP; return $help; } @@ -61,17 +62,20 @@ 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); + $force = $this->getOption(['f', 'force'], false); + $override = $this->getOption(['o', 'override'], false); + $output = Update::run($a->getBasePath(), $force, $override,true, false); break; case "dumpsql": ob_start(); - DBStructure::printStructure(); + DBStructure::printStructure($a->getBasePath()); $output = ob_get_clean(); break; case "toinnodb": @@ -79,11 +83,12 @@ HELP; DBStructure::convertToInnoDB(); $output = ob_get_clean(); break; + default: + $output = 'Unknown command: ' . $this->getArgument(0); } $this->out($output); return 0; } - }