Skip to content

Commit

Permalink
#90 Updater not executing migrations
Browse files Browse the repository at this point in the history
Execute migrations on update
  • Loading branch information
DerKnerd committed Aug 28, 2021
1 parent 1e4fbbd commit baaef04
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
File renamed without changes.
5 changes: 4 additions & 1 deletion src/Web/Actions/Update/PostUpdateAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@

namespace App\Web\Actions\Update;

use App\Database\Migrations\Migrator;
use App\Web\Actions\Action;
use JsonException;
use Nyholm\Psr7\Response;
use Psr\Http\Message\ResponseInterface;
use Throwable;
Expand All @@ -12,7 +14,7 @@ class PostUpdateAction extends UpdateAction
{
/**
* {@inheritDoc}
* @throws \JsonException
* @throws JsonException
*/
protected function action(): ResponseInterface
{
Expand All @@ -31,6 +33,7 @@ protected function action(): ResponseInterface
$zipStream->open($updatePath);
$zipStream->extractTo(__ROOT__);
$zipStream->close();
Migrator::migrate();
unlink(__ROOT__ . '/update.lock');
} catch (Throwable $exception) {
return $this->render(
Expand Down

0 comments on commit baaef04

Please sign in to comment.