mirror of
https://github.com/bitwarden/server.git
synced 2026-01-31 22:23:18 +08:00
21 lines
434 B
MySQL
21 lines
434 B
MySQL
|
|
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
|
||
|
|
|