private void HandleDeploymentHistory(string schemaName, string contextKey)
{
var factory = DbProviderFactories.GetFactory(m_ConnectionInfoBuilder.ProviderName);
using (var connection = factory.CreateConnection())
{
connection.ConnectionString = m_ConnectionInfoBuilder.BuildConnectionString(
m_Config.Database,
m_Config.AuthMode,
m_Config.SqlLogin,
m_Config.SqlPassword);
connection.Open();
Log.Information(
"Creating {contextKey} deployment history in {schemaName} schema " +
"on {endPointServer}\\{endpointDatabase} using {targetAssemblyPath}.",
contextKey,
schemaName,
m_Config.Database.ServerName,
m_Config.Database.DatabaseName,
m_Config.TargetAssemblyPath);
DeploymentHistory.Create(
contextKey,
GetVersion().ToString(),
m_Config.TargetAssemblyPath,
connection,
schemaName);
connection.Close();
}
}