can execute OXID migrations
This commit is contained in:
parent
8c3e36d283
commit
672e3bca67
14
deploy.php
14
deploy.php
@ -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')) &&
|
||||||
|
Loading…
Reference in New Issue
Block a user