can execute OXID migrations

This commit is contained in:
Daniel Seifert 2024-10-17 09:14:26 +02:00
parent 8c3e36d283
commit 672e3bca67

View File

@ -22,6 +22,7 @@ task('deploy:d3OxidTasks', [
desc('run all database migrations'); desc('run all database migrations');
task('migrate', [ task('migrate', [
'migrate:setShopsOffline', 'migrate:setShopsOffline',
'migrate:executeMigrations',
'migrate:setShopsOnline' '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'); desc('set shops online');
task('migrate:setShopsOnline', function() { task('migrate:setShopsOnline', function() {
if (has('bin/mysql') && strlen(get('bin/mysql')) && if (has('bin/mysql') && strlen(get('bin/mysql')) &&