Closed webdevilopers closed 8 years ago
Strange. I have almost the same as you and there is no problem, here is the output I get when there is no migration :
DEBUG[d15e3ef5] Command: cd /home/www/bnf_mednum/releases/20151113171923 && ( SYMFONY_ENV=prod /usr/bin/env php app/console doctrine:migrations:migrate --no-interaction --no-debug )
DEBUG[d15e3ef5]
DEBUG[d15e3ef5] Application Migrations
DEBUG[d15e3ef5]
DEBUG[d15e3ef5]
DEBUG[d15e3ef5] No migrations to execute.
Here how migrations are plugged in : after 'deploy:finishing', 'mycompany:migrations:migrate'
And here is the task I'm using :
namespace :mycompany do
desc 'Executes a migration to the latest available version'
namespace :migrations do
task :migrate do
invoke 'symfony:console', 'doctrine:migrations:migrate', '--no-interaction'
end
end
end
Notice how it does not seem to go to stderr… here is what I am using :
c show --installed|grep migration
doctrine/doctrine-migrations-bundle 1.0.1 Symfony DoctrineMigrationsBundle
doctrine/migrations v1.0.0 Database Schema migrations using Doctrine DBAL
That hint helped @greg0ire . The current version was missing the initial DoctrineMigrations
folder.
No the error is gone. Thanks!
Oh I see. Good job finding that!
Current setup following readme:
I don't always have migrations. I tried removing the
'--no-interaction
flag but the interaction never runs if no migrations are present. Mycap
aborts:Is there any way to run the task on demand like with Capifony those days? http://capifony.org/#useful-tasks
Possibly related to https://github.com/capistrano/symfony/issues/28 by @jurgenweber