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 Compare May 17, 2018 17:29
@jwage jwage requested a review from stof May 17, 2018 17:31
@jwage jwage force-pushed the all-or-nothing-migrations branch 2 times, most recently from 19856c5 to 4c35bf1 Compare May 17, 2018 17:46
@@ -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

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shoudln't it be xs:bool ?

@jwage jwage force-pushed the all-or-nothing-migrations branch 13 times, most recently from 146e747 to ea336e8 Compare May 17, 2018 21:59
@jwage jwage force-pushed the all-or-nothing-migrations branch from ea336e8 to acbe335 Compare May 17, 2018 22:03
@jwage jwage merged commit 3aad67a into master May 17, 2018
@jwage jwage deleted the all-or-nothing-migrations branch May 17, 2018 22:27
@@ -70,6 +70,8 @@ file like the following:

<migrations-directory>/path/to/migrations/classes/DoctrineMigrations</migrations-directory>

<all-or-nothing>1</all-or-nothing>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here it is 1...


<migrations-directory>/path/to/migrations/classes/DoctrineMigrations</migrations-directory>

<all-or-nothing>true</all-or-nothing>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

... here it is true.

Should be consistent

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the feedback

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wrapped in a single transaction

looks like a typo?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@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
Development

Successfully merging this pull request may close these issues.

4 participants