C# Class Chronozoom.Entities.ManualMigrationCheck

Inheritance: IDisposable
Datei anzeigen Open project: JayBeavers/ChronoZoom

Public Methods

Method Description
Dispose ( ) : void
Dispose ( bool disposing ) : void
ManualMigrationCheck ( ) : System

constructor - undertakes a migration needed check

Private Methods

Method Description
BuildAnyMissingMigrationStepsSQL ( string>.Dictionary migrated ) : string
CETableExists ( string tableName, SqlCeConnection sqlConnection ) : bool

Function to check if a table exists in a CE database.

CheckCE ( ) : void

manual migration check for SQL Server Compact Edition (CE)

CheckFull ( ) : void

manual migration check for SQL Server full editions and Azure

EnsureBitmasksPopulated ( ) : void
ExecCENativeSQL ( string sqlScript, SqlCeConnection sqlConnection ) : void

Use to run T-SQL scripts for SQL Server CE which can't be run through DbCommand since they include native, non-standard commands such as "GO". As there is no CE equivilent to ServerConnection, we will chunk the script into segments seperated by each GO and make each segment a unique DbCommand call. We will also remove the key/index ASC option, CLUSTERED option, [dbo] schema name, WITH CHECK parameter from any script since these are not supported, and convert the (MAX) option to an appropriate value and GetUTCDate to GetDate since these is not supported either. Additionally, any chunk containing a trigger will be completely ignored (the entire chunk) and not run since triggers are not supported. Thus this function is also a translator for CE scripts.

ExecFullNativeSQL ( string sqlScript, SqlConnection sqlConnection ) : void

Use to run T-SQL scripts for SQL Server or Azure which can't be run through DbCommand since they include native, non-standard commands such as "GO". This runs the scripts through a native interface instead. (Faster than splitting into separate DbCommand calls.)

Method Details

Dispose() public method

public Dispose ( ) : void
return void

Dispose() public method

public Dispose ( bool disposing ) : void
disposing bool
return void

ManualMigrationCheck() public method

constructor - undertakes a migration needed check
public ManualMigrationCheck ( ) : System
return System