From 672e3bca67def2ea4b2e2ee94091bd5d5b6b8ae8 Mon Sep 17 00:00:00 2001 From: Daniel Seifert Date: Thu, 17 Oct 2024 09:14:26 +0200 Subject: [PATCH] can execute OXID migrations --- deploy.php | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/deploy.php b/deploy.php index f3a194b..618d6b6 100644 --- a/deploy.php +++ b/deploy.php @@ -22,6 +22,7 @@ task('deploy:d3OxidTasks', [ desc('run all database migrations'); task('migrate', [ 'migrate:setShopsOffline', + 'migrate:executeMigrations', 'migrate:setShopsOnline' ]); @@ -38,6 +39,19 @@ task('migrate:setShopsOffline', function() { } }); +task('migrate:failed', function() { + invoke('migrate:setShopsOnline'); +})->hidden(); + +fail('migrate', 'migrate:failed'); + +desc('execute OXID Doctrine migrations'); +task('migrate:executeMigrations', function () { + if (test("[ -f {{current_path}}/vendor/bin/oe-eshop-doctrine_migration ]")) { + run('{{bin/php}} {{current_path}}/vendor/bin/oe-eshop-doctrine_migration migrations:migrate'); + } +}); + desc('set shops online'); task('migrate:setShopsOnline', function() { if (has('bin/mysql') && strlen(get('bin/mysql')) &&