

DECLARE @ReportID BIGINT = 1395 -- InventoryItemsByVendorOrders
	, @SuggestedItemFilterParameterTypeEnum BIGINT = 410

IF EXISTS(SELECT 1 FROM [dbo].[tbReportParameter] WHERE ReportID = @ReportID AND ParameterTypeEnum = @SuggestedItemFilterParameterTypeEnum)
BEGIN
	
	DELETE FROM [dbo].[tbReportParameter]
	WHERE ReportID = @ReportID
	AND ReportParameterID = @SuggestedItemFilterParameterTypeEnum

END
GO

DECLARE @ReportID BIGINT = 1395 -- InventoryItemsByVendorOrders
	, @MultipleItemIDsEnum BIGINT = 189
	, @MutlipleSuggestedItemIDsEnum BIGINT = -3

IF EXISTS(SELECT 1 FROM [dbo].[tbReportParameter] WHERE ReportID = @ReportID AND ParameterTypeEnum = @MutlipleSuggestedItemIDsEnum)
BEGIN
	
	UPDATE [dbo].[tbReportParameter]
	SET  ParameterTypeEnum = @MultipleItemIDsEnum
		, IsRequired = 1
	WHERE ReportID = @ReportID
	AND ParameterTypeEnum = @MutlipleSuggestedItemIDsEnum

END
GO


EXEC [dbo].[Rollback_RemoveDeployHistory] '190627-FMAS-1.sql'
GO
