mirror of
https://github.com/bitwarden/server.git
synced 2025-07-04 01:22:50 -05:00
[EC-427] Changed migration script to use 'Create OR Alter' for views and sprocs
This commit is contained in:
@ -19,13 +19,7 @@ END
|
|||||||
GO
|
GO
|
||||||
|
|
||||||
-- Recreate ProviderView so that it includes the new columns 'Type' and 'BillingPhone'
|
-- Recreate ProviderView so that it includes the new columns 'Type' and 'BillingPhone'
|
||||||
IF EXISTS(SELECT * FROM sys.views WHERE [Name] = 'ProviderView')
|
CREATE OR ALTER VIEW VIEW [dbo].[ProviderView]
|
||||||
BEGIN
|
|
||||||
DROP VIEW [dbo].[ProviderView]
|
|
||||||
END
|
|
||||||
GO
|
|
||||||
|
|
||||||
CREATE VIEW [dbo].[ProviderView]
|
|
||||||
AS
|
AS
|
||||||
SELECT
|
SELECT
|
||||||
*
|
*
|
||||||
@ -34,13 +28,7 @@ FROM
|
|||||||
GO
|
GO
|
||||||
|
|
||||||
-- Recreate ProviderUserProviderDetailsView so that it includes the new columns 'Type' and 'BillingPhone'
|
-- Recreate ProviderUserProviderDetailsView so that it includes the new columns 'Type' and 'BillingPhone'
|
||||||
IF EXISTS(SELECT * FROM sys.views WHERE [Name] = 'ProviderUserProviderDetailsView')
|
CREATE OR ALTER VIEW VIEW [dbo].[ProviderUserProviderDetailsView]
|
||||||
BEGIN
|
|
||||||
DROP VIEW [dbo].[ProviderUserProviderDetailsView]
|
|
||||||
END
|
|
||||||
GO
|
|
||||||
|
|
||||||
CREATE VIEW [dbo].[ProviderUserProviderDetailsView]
|
|
||||||
AS
|
AS
|
||||||
SELECT
|
SELECT
|
||||||
PU.[UserId],
|
PU.[UserId],
|
||||||
@ -61,7 +49,7 @@ FROM
|
|||||||
GO
|
GO
|
||||||
|
|
||||||
-- Alter Provider_Create view to add new columns 'Type' and 'BillingPhone'
|
-- Alter Provider_Create view to add new columns 'Type' and 'BillingPhone'
|
||||||
ALTER PROCEDURE [dbo].[Provider_Create]
|
CREATE OR ALTER PROCEDURE [dbo].[Provider_Create]
|
||||||
@Id UNIQUEIDENTIFIER OUTPUT,
|
@Id UNIQUEIDENTIFIER OUTPUT,
|
||||||
@Name NVARCHAR(50),
|
@Name NVARCHAR(50),
|
||||||
@BusinessName NVARCHAR(50),
|
@BusinessName NVARCHAR(50),
|
||||||
@ -124,7 +112,7 @@ END
|
|||||||
GO
|
GO
|
||||||
|
|
||||||
-- Alter Provider_Update view to add new columns 'Type' and 'BillingPhone'
|
-- Alter Provider_Update view to add new columns 'Type' and 'BillingPhone'
|
||||||
ALTER PROCEDURE [dbo].[Provider_Update]
|
CREATE OR ALTER PROCEDURE [dbo].[Provider_Update]
|
||||||
@Id UNIQUEIDENTIFIER,
|
@Id UNIQUEIDENTIFIER,
|
||||||
@Name NVARCHAR(50),
|
@Name NVARCHAR(50),
|
||||||
@BusinessName NVARCHAR(50),
|
@BusinessName NVARCHAR(50),
|
||||||
|
Reference in New Issue
Block a user