-
Notifications
You must be signed in to change notification settings - Fork 398
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
Added parallel migrations #551
Conversation
👍 |
please correct me if I am wrong: this PR removes the "old" way of doing migrations and does everything in parallel..? propelorm/Propel#777 added the parallel part optionally (opt-in like approach)? |
Yep, because you are no more tied to the migrations' timestamps anymore, if I understand correctly. |
Yes I dropped this because I think there's no benefit of keeping 2 ways of doing migrations. |
Can you also write some tests for that? |
I tried already :-) but I don't know how to set up the MigrationManager object in my tests properly. I need to call |
But where do I get the generator config? |
$generatorConfig = new GeneratorConfig(); :-) |
Thanks mate :) but $generatorConfig->getBuildConnections() is an empty array now |
Yes, because you have to pass a directory of a fixture you want to use. $generatorConfig->getBuildConnections(__DIR__. '/../../path/to/tests/Fixtures/migration/'); |
Thanks, tests are ready now. Time for review |
Hmm, all SQLite builds failed.. |
Fixed. Maybe later we can port the tests back to propel1 so we can merge propelorm/Propel#777 |
Any updates here? :-) |
LGTM @marcj |
it's ok for me to, |
it needs to be rebased. |
Rebase done |
Squash please :) |
Fixed missing method Added MigrationManager tests and fixed a bug in MigrationManager Fix for Only variables should be passed by reference Fixed migrationTableExists on sqlite
Squashed |
Good job 👯 |
This is a port of propelorm/Propel#777 to Propel2, without the backwards compatibility. This feature is request in #145. Basically it's just tracking of all executed migrations instead of the latest one.
Only problem is that I'm unable to write tests. I need to call
$migrationManager->setConnections(..)
in the tests but I'm not sure where to get the connection settings from. If someone could help me with this, I'll try to write some tests.I would really like to see this feature in Propel2 because it's really hard to use propel migrations if you have multiple feature branches.