can execute OXID migrations

Cette révision appartient à :
Daniel Seifert 2024-10-17 09:14:26 +02:00
Parent 8c3e36d283
révision 672e3bca67

Voir le fichier

@ -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')) &&