<?php
/**
- * @copyright Copyright (C) 2020, Friendica
+ * @copyright Copyright (C) 2010-2022, the Friendica project
*
* @license GNU AGPL version 3 or any later version
*
namespace Friendica\Console;
-use Friendica\Core\Config\Cache;
+use Friendica\Core\Config\ValueObject\Cache;
use Friendica\Core\Update;
use Friendica\Database\Database;
use Friendica\Database\DBStructure;
Commands
drop Show tables that aren't in use by Friendica anymore and can be dropped
- -e|--execute Execute the dropping
+ -e|--execute Execute the removal
update Update database schema
-f|--force Force the update command (Even if the database structure matches)
switch ($this->getArgument(0)) {
case "dryrun":
- $output = DBStructure::update($basePath, true, false);
+ $output = DBStructure::dryRun();
break;
case "update":
$force = $this->getOption(['f', 'force'], false);
$output = ob_get_clean();
break;
case "dumpsql":
+ DBStructure::writeStructure();
ob_start();
DBStructure::printStructure($basePath);
$output = ob_get_clean();