mirror of
https://github.com/bitwarden/server
synced 2025-12-06 00:03:34 +00:00
remove user twofactorenabled property
This commit is contained in:
@@ -1,23 +0,0 @@
|
||||
alter table [user] add [TwoFactorProviders] NVARCHAR (MAX) NULL
|
||||
go
|
||||
|
||||
update [user]
|
||||
set twofactorproviders = '{"0":{"Enabled":'+ (case when twofactorenabled = 1 then 'true' else 'false' end) +',"Remember":true,"MetaData":{"Key":"'+ authenticatorkey +'"}}}'
|
||||
where twofactorprovider is not null and twofactorprovider = 0
|
||||
and authenticatorkey is not null
|
||||
go
|
||||
|
||||
alter table [user] drop column authenticatorkey
|
||||
go
|
||||
|
||||
drop view [userview]
|
||||
go
|
||||
|
||||
CREATE VIEW [dbo].[UserView]
|
||||
AS
|
||||
SELECT
|
||||
*
|
||||
FROM
|
||||
[dbo].[User]
|
||||
go
|
||||
|
||||
13
util/SqlUpdate/2017-06-19_00_UserTwoFactorEnabled.sql
Normal file
13
util/SqlUpdate/2017-06-19_00_UserTwoFactorEnabled.sql
Normal file
@@ -0,0 +1,13 @@
|
||||
alter table [user] drop column twofactorenabled
|
||||
go
|
||||
|
||||
drop view [dbo].[UserView]
|
||||
go
|
||||
|
||||
CREATE VIEW [dbo].[UserView]
|
||||
AS
|
||||
SELECT
|
||||
*
|
||||
FROM
|
||||
[dbo].[User]
|
||||
GO
|
||||
Reference in New Issue
Block a user