Page 1 of 1

No rollback support in devart oracle provider for code first migrations

Posted: Mon 26 Nov 2012 21:06
by John Liu
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?

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

Posted: Wed 28 Nov 2012 16:25
by Shalex
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.

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

Posted: Wed 28 Nov 2012 19:02
by John Liu
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