1
0
mirror of https://github.com/bitwarden/server.git synced 2024-12-01 13:43:23 +01:00
bitwarden-server/util/SqlUpdate/2017-07-07_00_OrgFields.sql
2017-07-07 14:08:30 -04:00

24 lines
449 B
Transact-SQL

alter table [organization] add [UseTotp] BIT NULL
go
-- all but free plans
update [organization]
set
[UseTotp] = CASE WHEN [organization].[plantype] != 0 THEN 1 ELSE 0 END,
[MaxStorageGb] = CASE WHEN [organization].[plantype] != 0 THEN 1 ELSE NULL END
go
alter table [organization] alter column [UseTotp] BIT NOT NULL
go
drop view [dbo].[OrganizationView]
go
CREATE VIEW [dbo].[OrganizationView]
AS
SELECT
*
FROM
[dbo].[Organization]
GO