Update SQL that contains isMaster

This commit is contained in:
Jeavon Leopold
2021-09-22 17:41:18 +01:00
parent f18af9aaf4
commit a3ca09c82e
2 changed files with 2 additions and 2 deletions

View File

@@ -121,7 +121,7 @@ namespace Umbraco.Cms.Infrastructure.Persistence.Repositories.Implement
{
var timeoutDate = DateTime.Now.Subtract(staleTimeout);
Database.Update<ServerRegistrationDto>("SET isActive=0, isMaster=0 WHERE lastNotifiedDate < @timeoutDate", new { /*timeoutDate =*/ timeoutDate });
Database.Update<ServerRegistrationDto>("SET isActive=0, isSchedulingPublisher=0 WHERE lastNotifiedDate < @timeoutDate", new { /*timeoutDate =*/ timeoutDate });
ClearCache();
}
}

View File

@@ -175,7 +175,7 @@ namespace Umbraco.Cms.Tests.Integration.Umbraco.Infrastructure.Persistence.NPoco
// Assert
Assert.That(
commands[0].CommandText,
Is.EqualTo("INSERT INTO [umbracoServer] ([umbracoServer].[address], [umbracoServer].[computerName], [umbracoServer].[registeredDate], [umbracoServer].[lastNotifiedDate], [umbracoServer].[isActive], [umbracoServer].[isMaster]) VALUES (@0,@1,@2,@3,@4,@5), (@6,@7,@8,@9,@10,@11)"));
Is.EqualTo("INSERT INTO [umbracoServer] ([umbracoServer].[address], [umbracoServer].[computerName], [umbracoServer].[registeredDate], [umbracoServer].[lastNotifiedDate], [umbracoServer].[isActive], [umbracoServer].[isSchedulingPublisher]) VALUES (@0,@1,@2,@3,@4,@5), (@6,@7,@8,@9,@10,@11)"));
}
[Test]