private void ExecSql(SourceScript script, SqlScriptPhase phase) { if (script.HasPhaseExecuted(phase)) { return; } var sql = script.RequestSqlScriptPhase(phase); if (sql == null) { return; } sql = PhaseDeploymentComment + sql; var configuration = script.GetConfiguration(); using (var command = _connectionManager.CreateCommand(sql)) { foreach (var catalog in GetCatalogs(script)) { _logger.PostEntryNoTimestamp(" {0}", catalog); if (configuration == null) { command.Execute(catalog); } else { command.Execute(catalog, configuration.Settings.Timeout); } } } }
private void WriteScript(SourceScript script, SqlScriptPhase phase) { if (script.HasPhaseExecuted(phase)) { return; } var sql = script.RequestSqlScriptPhase(phase); if (sql == null) { return; } sql = PhaseDeploymentComment + sql; foreach (var catalog in GetCatalogs(script)) { _logger.PostEntryNoTimestamp(" {0}", catalog); WriteCommand(catalog, sql); } }
private void ExecSql(SourceScript script, SqlScriptPhase phase) { if (script.HasPhaseExecuted(phase)) return; var sql = script.RequestSqlScriptPhase(phase); if (sql == null) return; sql = PhaseDeploymentComment + sql; var configuration = script.GetConfiguration(); using (var command = _connectionManager.CreateCommand(sql)) { foreach (var catalog in GetCatalogs(script)) { _logger.PostEntryNoTimestamp(" {0}", catalog); if (configuration == null) command.Execute(catalog); else command.Execute(catalog, configuration.Settings.Timeout); } } }
private void WriteScript(SourceScript script, SqlScriptPhase phase) { if (script.HasPhaseExecuted(phase)) return; var sql = script.RequestSqlScriptPhase(phase); if (sql == null) return; sql = PhaseDeploymentComment + sql; foreach (var catalog in GetCatalogs(script)) { _logger.PostEntryNoTimestamp(" {0}", catalog); WriteCommand(catalog, sql); } }