Should Migrations Be Transactional?

497 views
Skip to first unread message

Todd Ropog

unread,
Jan 24, 2010, 10:55:19 PM1/24/10
to FluentMigrator Google Group
MigratorDotNet seems to have transactional migrations, i.e. if a
migration fails, the entire migration is rolled back. FluentMigrator
does not seem to do this. Is this by design, or has it just not been
implemented yet?

I created a test migration which creates a table and then forces an
error. The error causes the runner to crash and then the database is
left with the table still there, but no row is added to the
VersionInfo table. This is leaving the database in a broken state. Is
there a plan to wrap migrations in a transaction, or should this be
handled some other way?

Paul Batum

unread,
Jan 25, 2010, 12:42:31 AM1/25/10
to fluentmigrato...@googlegroups.com
I just wanted to add that transactional migrations is something I've wanted for a while now, and I've been tempted to implement it in my copy of Fluent Migrator, its just a matter of finding the time.



--
You received this message because you are subscribed to the Google Groups "FluentMigrator Google Group" group.
To post to this group, send email to fluentmigrato...@googlegroups.com.
To unsubscribe from this group, send email to fluentmigrator-goog...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/fluentmigrator-google-group?hl=en.


Sean Chambers

unread,
Jan 25, 2010, 10:18:52 PM1/25/10
to FluentMigrator Google Group
good point, something i've run into a couple of times.

I can see what it would take to implement, or if you want to submit a
patch I can apply.

Thanks

Sean

> > fluentmigrator-goog...@googlegroups.com<fluentmigrator-goo gle-group%2Bunsu...@googlegroups.com>

Sean Chambers

unread,
Jan 26, 2010, 12:30:12 AM1/26/10
to FluentMigrator Google Group
I've added the start of transaction support. So far only Sql Server is
supported.

If anyone wants to test it out and make sure it looks good. All tests
are passing and I added an integration test to confirm that it's
working as expected.

http://github.com/enkari/fluentmigrator/commit/e776961219bbc5bdb6693832b1bc724384759e8e

Paul Batum

unread,
Jan 29, 2010, 11:34:53 PM1/29/10
to fluentmigrator-google-group
Thanks for taking the time to get this in Sean! I'll give it a try this week.

To unsubscribe from this group, send email to fluentmigrator-goog...@googlegroups.com.

Eric Ridgeway

unread,
Jan 31, 2010, 1:44:39 PM1/31/10
to fluentmigrato...@googlegroups.com

Sean thanks this is great. Its been something I have wanted for a while as well.

On Jan 25, 2010 9:30 PM, "Sean Chambers" <scham...@gmail.com> wrote:

I've added the start of transaction support. So far only Sql Server is
supported.

If anyone wants to test it out and make sure it looks good. All tests
are passing and I added an integration test to confirm that it's
working as expected.

http://github.com/enkari/fluentmigrator/commit/e776961219bbc5bdb6693832b1bc724384759e8e

On Jan 25, 10:18 pm, Sean Chambers <schamber...@gmail.com> wrote: > good point, something i've run ...

Reply all
Reply to author
Forward
0 new messages