P
P
parovozik2282019-09-13 15:08:59
symfony
parovozik228, 2019-09-13 15:08:59

How to specify an additional path to migrations?

Good afternoon, can you tell me how to specify an additional path to migrations inside the bundle in Symfony 4? So that when executing the php bin/console doctrine:migrations:migrate command, migrations from the bundle are also applied

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Maxim Fedorov, 2019-09-13
@parovozik228

You need to specify the path to the settings with your migrations (if they are, for example, in a bundle)
For example, create a yml config with content, where the most important thing ismigrations_directory

migrations_directory: "<path>"
migrations_namespace: Application\Migrations
table_name: migration_versions

And then you can specify it when running migrations:
doctrine:migrations:migrate  --configuration=<path_to_configuration_of_migration_yml>

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question