DbUp/DbUp — pull request #53 by SimonRupar (2014-08-29 15:26:14+00:00)
Title: Oracle Support, extended console application, Providers code restructure

Based on pull-request #23 (Julian-maughan: Oracle Support) and #38 (JessieWandman : TemporarySqlDatabase sql instance).

1. Extended console application. Now console application can use different provider not only MSSQL server. Calling different providers is possible by application parameter (I know numbers for selecting providers are not so great, but so are not strings).

2. Added methods in DbUp.StandardExtensions for calling scripts from file system in absolute or relative way.

3. Changed logging of exception in UpgradeEngine. Only return exception message, not whole Exception.ToString(). Some fixes regarding logging has been changed also in SqlSciptExecutor.

4. I have created classes IQueryProvider, QueryProviderBase, SqlServerQueryProvider) which contains all SQL statements used in source. Based on my previous experience this can be a life-saver, because you don't need to recheck all source code for SQL statements when something change in databases. All providers extend QueryProviderBase and have their own SQL statements written for some functionality.

5. All providers and their classes are in separate projects. Only exception is MsSql Server, which is still in base library DbUp. I think it would be also useful if classes used for MsSql server is moved to separate project.

6. Regarding Oracle Support : Based on the nature of Oracle provider it is not possible to do transaction in such nature as in MsSql Server (DDL statements, see: http://docs.oracle.com/cd/E11882_01/server.112/e17118/statements_1001.htm#i2099120)
Because of this SQL scripts on oracle are executed "transaction per statement". When statement fails, new entry in versioning table is created containing where execution of script has failed. And then when someone "fixes" script, execution is continued from that statement on. There is also added validation, if previously successfully executed scripts or statements have been changed. Validation is checked by HashCodes. Oracle Unit-tests, OracleSampleApplication and scripts have also been added.