mirror of
https://github.com/slawkens/myaac.git
synced 2025-04-29 10:49:22 +02:00
Fix migrate command
This commit is contained in:
parent
32cdb51812
commit
c2516c3b6b
@ -34,6 +34,8 @@ class MigrateToCommand extends Command
|
|||||||
|
|
||||||
$this->initEnv();
|
$this->initEnv();
|
||||||
|
|
||||||
|
app()->get('database');
|
||||||
|
|
||||||
$currentVersion = Config::where('name', 'database_version')->first()->value;
|
$currentVersion = Config::where('name', 'database_version')->first()->value;
|
||||||
if ($currentVersion > $versionDest) {
|
if ($currentVersion > $versionDest) {
|
||||||
// downgrade
|
// downgrade
|
||||||
@ -62,7 +64,7 @@ class MigrateToCommand extends Command
|
|||||||
|
|
||||||
private function executeMigration($id, $_up): void
|
private function executeMigration($id, $_up): void
|
||||||
{
|
{
|
||||||
global $db;
|
$db = app()->get('database');
|
||||||
|
|
||||||
$db->revalidateCache();
|
$db->revalidateCache();
|
||||||
|
|
||||||
@ -98,11 +100,6 @@ class MigrateToCommand extends Command
|
|||||||
|
|
||||||
$config['lua'] = load_config_lua($config['server_path'] . 'config.lua');
|
$config['lua'] = load_config_lua($config['server_path'] . 'config.lua');
|
||||||
|
|
||||||
// POT
|
|
||||||
require_once SYSTEM . 'libs/pot/OTS.php';
|
require_once SYSTEM . 'libs/pot/OTS.php';
|
||||||
$ots = POT::getInstance();
|
|
||||||
$eloquentConnection = null;
|
|
||||||
|
|
||||||
require_once SYSTEM . 'database.php';
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user