1
0
mirror of https://github.com/devcode-it/openstamanager.git synced 2025-06-05 22:09:38 +02:00

Ottimizzazione procedura di configurazione iniziale

This commit is contained in:
Dasc3er
2021-08-02 15:01:43 +02:00
parent bb5151329e
commit a8d500e674
3 changed files with 39 additions and 2 deletions

View File

@ -70,6 +70,11 @@ class UpdateController extends Controller
{
$migrator = self::getMigrator();
// Fallback per creazione tabella di migrazioni
if (!$migrator->getRepository()->repositoryExists()) {
$migrator->getRepository()->createRepository();
}
$paths = array_merge(
$migrator->paths(),
[app()->databasePath().DIRECTORY_SEPARATOR.'migrations']
@ -144,7 +149,7 @@ class UpdateController extends Controller
$result = Update::doUpdate(self::$legacyUpdateRate);
$rate = 0;
if (is_array($result)) {
if (!is_bool($result) && is_array($result)) {
$rate = $result[1] - $result[0];
} elseif (!empty($update['script'])) {
$rate = self::$legacyScriptValue;