Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support configuration file when making migrations #508

Closed
yifei3212 opened this issue Nov 28, 2019 · 8 comments · Fixed by #516
Closed

Support configuration file when making migrations #508

yifei3212 opened this issue Nov 28, 2019 · 8 comments · Fixed by #516
Labels
Feature New Feature HasPR

Comments

@yifei3212
Copy link

The current project I'm working on has two sets of migration systems which have completely different migration files for different tables.

The doctrine commands accept parameters, such as --em, --connection, --configuration, which makes it possible to support multiple sets of migration systems.

When using maker to make migrations, I also want to change the configurations such as 'migrations_directory' or 'migrations_namespace'. Is that possible by using the maker command?

@LeJeanbono
Copy link
Contributor

@yifei3212
Copy link
Author

Hi, @LeJeanbono , that's what I want to know. We are using two different doctrine configuration files for different sets of migration files. I wonder if it's possible to choose which configuration file to use when doing make:migration.

@LeJeanbono
Copy link
Contributor

Ok @yifei3212, what is the doctrine command that you use actualy to switch doctrine config ?

@yifei3212
Copy link
Author

yifei3212 commented Dec 5, 2019

Hi, @LeJeanbono, for example, when running the doctrine commands, I would do something like bin/console doctrine:migrations:migrate --em=some-entity-manager --configuration=some-migrations.yml

In some-migrations.yml, I can set migrations_namespace, migrations_directory, etc. I want to do the same when making a migration file, but I don't know how to.

@LeJeanbono
Copy link
Contributor

Ok, --configuration is not implemented for maker.
I will make a PR this week ;)

@yifei3212
Copy link
Author

@LeJeanbono Thank you so much!

@yifei3212
Copy link
Author

Hi, @LeJeanbono, can I ask when could this be merged?

@LeJeanbono
Copy link
Contributor

@weaverryan @romaricdrigon can we make a release ? :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature New Feature HasPR
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants