Reputation: 454
As doctrine migrations help says:
Or you can also execute the migration without a warning message which you need to interact with:
./bin/console doctrine:migrations:migrate --no-interaction
I try to run current migration version by command:
./bin/console doctrine:migrations:migrate current --no-interaction
Nevertheless, I always get an error:
WARNING! You have 1 previously executed migrations in the database that are not registered migrations.
>> 2020-01-29 13:03:03 (20200129130303)
No migrations to execute.
Of course, I clearly understand that "I have 1 previously executed migrations". And It is my goal to execute a specific old version without any interaction. How can I achieve it?
Upvotes: 0
Views: 7023
Reputation: 956
That's not an error, that's just warning. It's displayed for the reasons @rkeet mentioned in comment. The command is still executed without interaction.
If you do not want to see any output, you should use --quiet, -q
flag.
Interaction is when Symfony asks you Are you sure you want to execute migrations?
(or whatever the messages are), and you answer with either y
or n
. This part is omitted with a --no-interaction
flag.
Upvotes: 2