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

update script for two factor

This commit is contained in:
Kyle Spearrin 2017-06-07 15:39:43 -04:00
parent b5fbe23be2
commit f352ec808f
3 changed files with 20 additions and 17 deletions

View File

@ -1,6 +0,0 @@
alter table [organization] add [UseGroups] bit null
go
update [organization] set UseGroups = 0
go
alter table [organization] alter column [UseGroups] bit not null
go

View File

@ -1,11 +0,0 @@
alter table [CollectionUser] drop constraint [PK_CollectionUser]
go
alter table [CollectionUser] drop column id
go
alter table [CollectionUser] drop column revisiondate
go
alter table [CollectionUser] drop column creationdate
go

View File

@ -0,0 +1,20 @@
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