1
0
mirror of https://github.com/bitwarden/server.git synced 2025-04-05 05:00:19 -05:00

[Captcha] Update migration script with Default Constraint (#1905)

This commit is contained in:
Vincent Salucci 2022-03-11 16:38:52 -06:00 committed by GitHub
parent b011e405f0
commit 218bdba84d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -4,24 +4,10 @@ BEGIN
ALTER TABLE ALTER TABLE
[dbo].[User] [dbo].[User]
ADD ADD
[FailedLoginCount] INT NULL [FailedLoginCount] INT NOT NULL CONSTRAINT D_User_FailedLoginCount DEFAULT 0
END END
GO GO
UPDATE
[dbo].[User]
SET
[FailedLoginCount] = 0
WHERE
[FailedLoginCount] IS NULL
GO
ALTER TABLE
[dbo].[User]
ALTER COLUMN
[FailedLoginCount] INT NOT NULL
GO
-- Table: User (LastFailedLoginDate) -- Table: User (LastFailedLoginDate)
IF COL_LENGTH('[dbo].[User]', 'LastFailedLoginDate') IS NULL IF COL_LENGTH('[dbo].[User]', 'LastFailedLoginDate') IS NULL
BEGIN BEGIN