Symfony Doctrine Migrations / GitLab CI interprets "Nothing to migrate" as error
We are using the Doctrine migrations bundle for update database in our deployment process. Currently, we are switching to Gitlab-CI.
The problem: The CI is aborting the deployment process because the output of command `php sf doctrine:migrations:diff` contains stderr.
The part of our .gitlab-ci.yml:
```
deploy_live:
type: deploy
environment:
name: live
url: 1.2.3.4
script:
- ssh root@1.2.3.4 "cd /var/www/html/ && git pull origin master && exit"
- ssh root@11.2.3.4 "cd /var/www/html/ && composer install -n && exit"
- ssh root@1.2.3.4 "cd /var/www/html/ && php sf doctrine:migrations:diff --env=prod && exit"
- ssh root@1.2.3.4 "cd /var/www/html/ && php sf doctrine:migrations:migrate -n --env=prod && exit"
- 'ssh root@1.2.3.4 "cd /var/www/html/ && chown www-data:www-data . -R && exit"'
only:
- master
```
Output of Gitlab CI:
```
$ ssh root@1.2.3.4 "cd /var/www/html/ && php sf doctrine:migrations:diff --env=prod && exit"
#!/usr/bin/env php
In NoChangesDetected.php line 13:
No changes detected in your mapping information.
doctrine:migrations:diff [--configuration [CONFIGURATION]] [--db-configuration [DB-CONFIGURATION]] [--editor-cmd [EDITOR-CMD]] [--filter-expression [FILTER-EXPRESSION]] [--formatted] [--line-length [LINE-LENGTH]] [--check-database-platform [CHECK-DATABASE-PLATFORM]] [--db DB] [--em [EM]] [--shard SHARD] [-h|--help] [-q|--quiet] [-v|vv|vvv|--verbose] [-V|--version] [--ansi] [--no-ansi] [-n|--no-interaction] [-e|--env ENV] [--no-debug] [--] <command>
ERROR: Job failed: exit code 1
```
This may be a bug, but maybe it can be circumvented?
FYI: `sf` is a symlink to `bin/console`.
Symfony Doctrine Migrations: see https://github.com/doctrine/migrations
issue