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

Implement all or nothing transaction strategy for migrations. #683

Merged
merged 1 commit into from May 17, 2018

Conversation

Projects
None yet
4 participants
@jwage
Copy link
Member

jwage commented May 17, 2018

Q A
Type feature
BC Break yes
Fixed issues #594

Summary

Implement all or nothing transaction strategy for migrations.

@jwage jwage added this to the 2.0 milestone May 17, 2018

@jwage jwage self-assigned this May 17, 2018

@jwage jwage force-pushed the all-or-nothing-migrations branch 5 times, most recently from a18b89a to 9e23538 May 17, 2018

@jwage jwage requested a review from stof May 17, 2018

@jwage jwage force-pushed the all-or-nothing-migrations branch 2 times, most recently from 19856c5 to 4c35bf1 May 17, 2018

@@ -24,6 +24,7 @@
</xs:simpleType>
</xs:element>
<xs:element type="xs:string" name="migrations-directory" minOccurs="0" maxOccurs="1"/>
<xs:element type="xs:string" name="all-or-nothing" minOccurs="0" maxOccurs="1"/>

This comment has been minimized.

@stof

stof May 17, 2018

Member

shoudln't it be xs:bool ?

@jwage jwage force-pushed the all-or-nothing-migrations branch 13 times, most recently from 146e747 to ea336e8 May 17, 2018

@jwage jwage force-pushed the all-or-nothing-migrations branch from ea336e8 to acbe335 May 17, 2018

@jwage jwage merged commit 3aad67a into master May 17, 2018

3 checks passed

Scrutinizer Analysis: 21 updated code elements – Tests: passed
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details

@jwage jwage deleted the all-or-nothing-migrations branch May 17, 2018

@jwage jwage removed WIP BC Break labels May 17, 2018

@@ -70,6 +70,8 @@ file like the following:
<migrations-directory>/path/to/migrations/classes/DoctrineMigrations</migrations-directory>
<all-or-nothing>1</all-or-nothing>

This comment has been minimized.

@OskarStark

OskarStark Jan 10, 2019

Here it is 1...

<migrations-directory>/path/to/migrations/classes/DoctrineMigrations</migrations-directory>
<all-or-nothing>true</all-or-nothing>

This comment has been minimized.

@OskarStark

OskarStark Jan 10, 2019

... here it is true.

Should be consistent

This comment has been minimized.

@jwage

This comment has been minimized.

@OskarStark

OskarStark Jan 10, 2019

Thanks for the feedback

This comment has been minimized.

@OskarStark

OskarStark Jan 10, 2019

Thanks for the feedback


If you want your migrations to be all or nothing then you can configure your migrations behave that way.
This means when you executed multiple migrations in a row, the whole migration will be wrapped
in a single migration and if one of the migrations fails, the transaction will be rolled back.

This comment has been minimized.

@apfelbox

apfelbox Jan 10, 2019

wrapped in a single transaction

looks like a typo?

This comment has been minimized.

@jwage

jwage Jan 10, 2019

Member

Looks like it. Can you check if it still exists in master and record an issue to fix it if so?

This comment has been minimized.

@apfelbox

apfelbox Jan 10, 2019

@jwage oh, didn't realize that the PR is so old 😅

The whole paragraph is gone in 2.0 and I couldn't find it in 1.8 either (that's where this PR landed).

So probably already fixed then. 👍
Sorry for the noise.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment