Skip to content

Commit

Permalink
Update timestamp on migration
Browse files Browse the repository at this point in the history
  • Loading branch information
manio143 committed Sep 23, 2023
1 parent 44d5e6e commit 438dd39
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using System.Linq;
using System;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using ManagementHub.Models.Abstraction.Commands.Migrations;
Expand Down Expand Up @@ -46,7 +47,7 @@ public async Task TryMigrateUserIdAsync(string email, CancellationToken cancella

await this.dbContext.Users
.Where(u => u.Id == userIdAndStatus.Id)
.ExecuteUpdateAsync(update => update.SetProperty(u => u.UniqueId, newUserId.ToString()));
.ExecuteUpdateAsync(update => update.SetProperty(u => u.UniqueId, newUserId.ToString()).SetProperty(u => u.UpdatedAt, DateTime.UtcNow));

this.logger.LogInformation(0x1eb9ea03, "Migration completed.");
}
Expand Down

0 comments on commit 438dd39

Please sign in to comment.