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

Implement all or nothing transaction strategy for migrations. #683

Merged
merged 1 commit into from May 17, 2018

Conversation

@jwage
Copy link
Member

@jwage 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"/>
Copy link
Member

@stof stof May 17, 2018

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
@jwage jwage deleted the all-or-nothing-migrations branch 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>

Here it is 1...

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

... here it is true.

Should be consistent

Copy link
Member Author

@jwage jwage Jan 10, 2019

Thanks for the feedback

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.

wrapped in a single transaction

looks like a typo?

Copy link
Member Author

@jwage jwage Jan 10, 2019

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

@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
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

4 participants