1
0
mirror of https://github.com/bitwarden/server.git synced 2024-11-29 13:25:17 +01:00
bitwarden-server/util/SqlUpdate/2017-07-07_00_OrgFields.sql

27 lines
513 B
MySQL
Raw Normal View History

2017-07-07 20:08:30 +02:00
alter table [organization] add [UseTotp] BIT NULL
go
2017-07-26 18:21:59 +02:00
alter table [organization] add [MaxStorageGb] SMALLINT NULL
go
2017-07-07 20:08:30 +02:00
-- 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