1
0
mirror of https://github.com/bitwarden/server synced 2026-01-19 00:43:47 +00:00

add timestamps to user table for security related events (#2660)

* add timestamps to user table for security related events

* ef migrations

* fix lint problems

* formatting

* add missing namespace back

* move `now` up some

* review fixes

* add missing view rebuild to migration script
This commit is contained in:
Kyle Spearrin
2023-02-02 14:39:57 -05:00
committed by GitHub
parent 0ce95ec147
commit 7e74695afc
18 changed files with 6970 additions and 13 deletions

View File

@@ -37,7 +37,11 @@
@FailedLoginCount INT = 0,
@LastFailedLoginDate DATETIME2(7),
@UnknownDeviceVerificationEnabled BIT = 1,
@AvatarColor VARCHAR(7) = NULL
@AvatarColor VARCHAR(7) = NULL,
@LastPasswordChangeDate DATETIME2(7) = NULL,
@LastKdfChangeDate DATETIME2(7) = NULL,
@LastKeyRotationDate DATETIME2(7) = NULL,
@LastEmailChangeDate DATETIME2(7) = NULL
AS
BEGIN
SET NOCOUNT ON
@@ -82,7 +86,11 @@ BEGIN
[UnknownDeviceVerificationEnabled],
[AvatarColor],
[KdfMemory],
[KdfParallelism]
[KdfParallelism],
[LastPasswordChangeDate],
[LastKdfChangeDate],
[LastKeyRotationDate],
[LastEmailChangeDate]
)
VALUES
(
@@ -124,6 +132,10 @@ BEGIN
@UnknownDeviceVerificationEnabled,
@AvatarColor,
@KdfMemory,
@KdfParallelism
@KdfParallelism,
@LastPasswordChangeDate,
@LastKdfChangeDate,
@LastKeyRotationDate,
@LastEmailChangeDate
)
END