C# 클래스 DatabaseMigraine.Managers.MigrationManager

상속: DbScriptFolderManager
파일 보기 프로젝트 열기: 7digital/DatabaseMigraine 1 사용 예제들

공개 메소드들

메소드 설명
GenerateMigrations ( DirectoryInfo dbScriptsPath, string dbname, Server server, DirectoryInfo outPath ) : int
GenerateMigrationsContentsToDisk ( IEnumerable scripts, DirectoryInfo outPath, string dbname ) : int
GetMigrationId ( string scriptFileNameWithoutExtension ) : int
GetMigrationsRunInDb ( DirectoryInfo dbScriptsPath, Server dbServer, string dbname ) : IEnumerable
GetNonRetiredMigrationsRunInDb ( DirectoryInfo dbScriptsPath, Server dbServer, string dbname ) : IEnumerable
GetSqlSriptsIn ( string dbScriptsPath ) : IEnumerable
RunScripts ( Server disposableDbServer, string dbScriptsPath, string dbname, string originalDbName, IEnumerable scriptFileNameWhiteList ) : int

보호된 메소드들

메소드 설명
CheckContentViolationRules ( string>.Dictionary elementNameToScriptContents, string originalDbName ) : void
RetrieveContentsWhileCheckConventions ( string originalDbName, IEnumerable scripts ) : string>.IDictionary
RunScript ( string>.KeyValuePair script, string dbname ) : void

비공개 메소드들

메소드 설명
CheckForRiskyBatchStatementGO ( string>.IDictionary scriptsWithContents ) : void
CheckIfDatabaseChangeLogTableExists ( Database database ) : void
EscapeSql ( string content ) : string
FileNameToTransactionName ( string scriptFileNameWithoutExtension ) : string
GenerateHash ( string scriptContents ) : string
GenerateMigration ( string scriptFileNameWithoutExtension, string scriptContents ) : GeneratedMigration
GenerateMigrationFor ( SqlExecutor executor, string scriptFileNameWithoutExtension, string scriptContents, string dbname ) : GeneratedMigration
GetInsertStatementForMigration ( FileInfo script ) : string
GetInsertStatementForMigration ( int migrationId, string scriptFileNameWithoutExtension, string hash ) : string
MigrationAlreadyRun ( SqlExecutor executor, string hash, string dbname ) : bool

메소드 상세

CheckContentViolationRules() 보호된 메소드

protected CheckContentViolationRules ( string>.Dictionary elementNameToScriptContents, string originalDbName ) : void
elementNameToScriptContents string>.Dictionary
originalDbName string
리턴 void

GenerateMigrations() 공개 메소드

public GenerateMigrations ( DirectoryInfo dbScriptsPath, string dbname, Server server, DirectoryInfo outPath ) : int
dbScriptsPath System.IO.DirectoryInfo
dbname string
server Server
outPath System.IO.DirectoryInfo
리턴 int

GenerateMigrationsContentsToDisk() 공개 메소드

public GenerateMigrationsContentsToDisk ( IEnumerable scripts, DirectoryInfo outPath, string dbname ) : int
scripts IEnumerable
outPath System.IO.DirectoryInfo
dbname string
리턴 int

GetMigrationId() 공개 정적인 메소드

public static GetMigrationId ( string scriptFileNameWithoutExtension ) : int
scriptFileNameWithoutExtension string
리턴 int

GetMigrationsRunInDb() 공개 메소드

public GetMigrationsRunInDb ( DirectoryInfo dbScriptsPath, Server dbServer, string dbname ) : IEnumerable
dbScriptsPath System.IO.DirectoryInfo
dbServer Server
dbname string
리턴 IEnumerable

GetNonRetiredMigrationsRunInDb() 공개 메소드

public GetNonRetiredMigrationsRunInDb ( DirectoryInfo dbScriptsPath, Server dbServer, string dbname ) : IEnumerable
dbScriptsPath System.IO.DirectoryInfo
dbServer Server
dbname string
리턴 IEnumerable

GetSqlSriptsIn() 공개 메소드

public GetSqlSriptsIn ( string dbScriptsPath ) : IEnumerable
dbScriptsPath string
리턴 IEnumerable

RetrieveContentsWhileCheckConventions() 보호된 메소드

protected RetrieveContentsWhileCheckConventions ( string originalDbName, IEnumerable scripts ) : string>.IDictionary
originalDbName string
scripts IEnumerable
리턴 string>.IDictionary

RunScript() 보호된 메소드

protected RunScript ( string>.KeyValuePair script, string dbname ) : void
script string>.KeyValuePair
dbname string
리턴 void

RunScripts() 공개 메소드

public RunScripts ( Server disposableDbServer, string dbScriptsPath, string dbname, string originalDbName, IEnumerable scriptFileNameWhiteList ) : int
disposableDbServer Server
dbScriptsPath string
dbname string
originalDbName string
scriptFileNameWhiteList IEnumerable
리턴 int