File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
src/GetSqlServerVersionInfo Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -194,7 +194,7 @@ private static string BuildSqlScript(List<SqlServerBuild> builds)
194194 {
195195 var sqlScript = new StringBuilder ( ) ;
196196 sqlScript . AppendLine ( @"
197- IF NOT EXISTS (SELECT NULL FROM sys.tables WHERE [name] = ' SqlServerVersions')
197+ IF (OBJECT_ID('dbo. SqlServerVersions') IS NULL )
198198BEGIN
199199
200200 CREATE TABLE dbo.SqlServerVersions
@@ -218,6 +218,7 @@ ReleaseDate ASC
218218 );
219219
220220END;
221+ GO
221222
222223DELETE dbo.SqlServerVersions;"
223224 ) ;
@@ -233,7 +234,9 @@ INSERT INTO dbo.SqlServerVersions
233234 }
234235 // Remove the trailing comma
235236 sqlScript . Remove ( sqlScript . Length - 1 , 1 ) ;
236- sqlScript . Append ( ';' ) ;
237+ sqlScript . Append ( @"
238+ ;
239+ GO" ) ;
237240
238241 return sqlScript . ToString ( ) ;
239242 }
You can’t perform that action at this time.
0 commit comments