No rollback support in devart oracle provider for code first migrations

Discussion of open issues, suggestions and bugs regarding Entity Framework support in ADO.NET Data providers
Post Reply
John Liu
Posts: 61
Joined: Wed 14 Nov 2012 20:58

No rollback support in devart oracle provider for code first migrations

Post by John Liu » Mon 26 Nov 2012 21:06

PM> Update-Database -verbose
Error occurred in the middle of the process. the database is partially updated. there is no rollback implemented. Can we have an option that every database update is an atomic action?

Shalex
Site Admin
Posts: 8287
Joined: Thu 14 Aug 2008 12:44

Re: No rollback support in devart oracle provider for code first migrations

Post by Shalex » Wed 28 Nov 2012 16:25

Oracle server doesn't support a transactional DDL. As a possible solution in this situation, specify the –Verbose flag so that you can see the SQL that Code First Migrations is running (as you have specified in your example) - you will find which exact changes were applied before the fail. After this, you should write and execute the "rollback" statements manually.

We will investigate the possibility of implementing a mechanism for more convenient processing this problem.

John Liu
Posts: 61
Joined: Wed 14 Nov 2012 20:58

Re: No rollback support in devart oracle provider for code first migrations

Post by John Liu » Wed 28 Nov 2012 19:02

Thank you for willing to look into this problem further. If rollback can not be done, can you modify your sql generation to drop table/index by checking if they are still exist first? so we manually fix the database, and run Update-Datagbase again.
thanks
John

Post Reply