C# Class Rhetos.Deployment.DataMigration

Show file Open project: Rhetos/Rhetos Class Usage Examples

Protected Properties

Property Type Description
ScriptLanguageRegex System.Text.RegularExpressions.Regex
_configuration IConfiguration
_deployPackagesLogger ILogger
_logger ILogger
_scriptsProvider IDataMigrationScriptsProvider
_sqlExecuter ISqlExecuter

Public Methods

Method Description
DataMigration ( ISqlExecuter sqlExecuter, ILogProvider logProvider, IDataMigrationScriptsProvider scriptsProvider, IConfiguration configuration ) : System
ExecuteDataMigrationScripts ( ) : DataMigrationReport
UndoDataMigrationScripts ( List createdTags ) : void

Protected Methods

Method Description
ApplyToDatabase ( List toRemove, List toExecute ) : void
FindScriptsInOtherLanguages ( IEnumerable newScripts, string databaseLanguage ) : List
FindSkipedScriptsInEachPackage ( List oldScripts, List newScripts ) : List
GetFirstSubfolder ( string path ) : string
LoadScriptsFromDatabase ( ) : List
LogScript ( string msg, DataMigrationScript script, EventType eventType = EventType.Trace ) : void
LogScripts ( string msg, IEnumerable scripts, EventType eventType = EventType.Trace ) : void
SaveDataMigrationScriptMetadata ( DataMigrationScript script ) : string

Method Details

ApplyToDatabase() protected method

protected ApplyToDatabase ( List toRemove, List toExecute ) : void
toRemove List
toExecute List
return void

DataMigration() public method

public DataMigration ( ISqlExecuter sqlExecuter, ILogProvider logProvider, IDataMigrationScriptsProvider scriptsProvider, IConfiguration configuration ) : System
sqlExecuter ISqlExecuter
logProvider ILogProvider
scriptsProvider IDataMigrationScriptsProvider
configuration IConfiguration
return System

ExecuteDataMigrationScripts() public method

public ExecuteDataMigrationScripts ( ) : DataMigrationReport
return DataMigrationReport

FindScriptsInOtherLanguages() protected static method

protected static FindScriptsInOtherLanguages ( IEnumerable newScripts, string databaseLanguage ) : List
newScripts IEnumerable
databaseLanguage string
return List

FindSkipedScriptsInEachPackage() protected method

protected FindSkipedScriptsInEachPackage ( List oldScripts, List newScripts ) : List
oldScripts List
newScripts List
return List

GetFirstSubfolder() protected static method

protected static GetFirstSubfolder ( string path ) : string
path string
return string

LoadScriptsFromDatabase() protected method

protected LoadScriptsFromDatabase ( ) : List
return List

LogScript() protected method

protected LogScript ( string msg, DataMigrationScript script, EventType eventType = EventType.Trace ) : void
msg string
script DataMigrationScript
eventType EventType
return void

LogScripts() protected method

protected LogScripts ( string msg, IEnumerable scripts, EventType eventType = EventType.Trace ) : void
msg string
scripts IEnumerable
eventType EventType
return void

SaveDataMigrationScriptMetadata() protected static method

protected static SaveDataMigrationScriptMetadata ( DataMigrationScript script ) : string
script DataMigrationScript
return string

UndoDataMigrationScripts() public method

public UndoDataMigrationScripts ( List createdTags ) : void
createdTags List
return void

Property Details

ScriptLanguageRegex protected static property

protected static Regex,System.Text.RegularExpressions ScriptLanguageRegex
return System.Text.RegularExpressions.Regex

_configuration protected property

protected IConfiguration _configuration
return IConfiguration

_deployPackagesLogger protected property

protected ILogger _deployPackagesLogger
return ILogger

_logger protected property

protected ILogger _logger
return ILogger

_scriptsProvider protected property

protected IDataMigrationScriptsProvider _scriptsProvider
return IDataMigrationScriptsProvider

_sqlExecuter protected property

protected ISqlExecuter _sqlExecuter
return ISqlExecuter