Skip to content

Commit 96fb71d

Browse files
committed
Updated stored procedure to account for LastModifiedBy
Previously, the `DeleteOrphanedLastModifiedAttributes` only accounted for `LastModified`, not `LastModifiedBy`—and, as such, would not get tripped if both the `LastModified` _and_ `LastModifiedBy` attributes were updated at the same time, even if no other attributes were updated. This resolves that issue, as a first step toward #88.
1 parent b7a89bf commit 96fb71d

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

OnTopic.Data.Sql.Database/Utilities/Stored Procedures/DeleteOrphanedLastModifiedAttributes.sql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,13 @@ FROM Attributes
3737
LEFT JOIN Attributes Unmatched
3838
ON Attributes.TopicID = Unmatched.TopicID
3939
AND Attributes.Version = Unmatched.Version
40-
AND Attributes.AttributeKey != Unmatched.AttributeKey
40+
AND Unmatched.AttributeKey NOT LIKE 'LastModified%'
4141
LEFT JOIN ExtendedAttributes UnmatchedExtended
4242
ON Attributes.TopicID = UnmatchedExtended.TopicID
4343
AND Attributes.Version = UnmatchedExtended.Version
4444
WHERE Unmatched.AttributeKey IS NULL
4545
AND UnmatchedExtended.TopicID IS NULL
46-
AND Attributes.AttributeKey = 'LastModified'
46+
AND Attributes.AttributeKey LIKE 'LastModified%'
4747

4848
--------------------------------------------------------------------------------------------------------------------------------
4949
-- CHECK FINAL VALUES

0 commit comments

Comments
 (0)