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:
parent
b011e405f0
commit
218bdba84d
@ -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
|
||||||
|
Loading…
x
Reference in New Issue
Block a user