<?php
/**
- * @copyright Copyright (C) 2020, Friendica
+ * @copyright Copyright (C) 2010-2021, the Friendica project
*
* @license GNU AGPL version 3 or any later version
*
use Asika\SimpleConsole\CommandArgsException;
use Friendica\Core\StorageManager;
+use Friendica\Model\Storage\StorageException;
/**
* tool to manage storage backend and stored data from CLI
$current = $this->storageManager->getBackend();
$total = 0;
+ if (is_null($current)) {
+ throw new StorageException(sprintf("Cannot move to legacy storage. Please select a storage backend."));
+ }
+
do {
$moved = $this->storageManager->move($current, $tables, $this->getOption('n', 5000));
if ($moved) {