private bool IsScriptRunDeployInfoTablePresent() { var statement = string.Format( @"SELECT Present = Count(*) FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[{0}]') AND type in (N'U')", ScriptsRunDeployInfo.GetTableName()); using (var connection = _configuration.GetConnection()) { return(connection.Query <int>(statement).FirstOrDefault() > 0); } }
private void CheckForScriptsRunDeployInfoTable() { Logger.InfoFormat("Creating [{0}] table, if it does not exist..", ScriptsRunDeployInfo.GetTableName()); CreateInfoTable("scriptsrundeployinfo_create.sql"); }