1
0
mirror of https://github.com/bitwarden/server.git synced 2025-07-03 17:12:49 -05:00

[EC-427] Removed default value from Provider.Type column

This commit is contained in:
Rui Tome
2022-12-27 13:57:20 +00:00
parent 278783223b
commit a1c62222a7
2 changed files with 12 additions and 2 deletions

View File

@ -4,10 +4,20 @@ BEGIN
ALTER TABLE
[dbo].[Provider]
ADD
[Type] TINYINT NOT NULL CONSTRAINT [DF_Provider_Type] DEFAULT (0);
[Type] TINYINT NULL
END
GO
-- Setting existing Providers Type = 0 (MSP)
UPDATE [dbo].[Provider]
SET [Type] = 0
WHERE [Type] is NULL
GO
-- Changing 'Type' column to not null
ALTER TABLE [dbo].[Provider] ALTER COLUMN [Type] TINYINT NOT NULL
GO
-- Add column 'BillingPhone' to 'Provider' table
IF COL_LENGTH('[dbo].[Provider]', 'BillingPhone') IS NULL
BEGIN