Add object existence checks option is preventing ALTER
dschaeff
Posts: 12
When "Add object existence checks" is checked the generated script fails to perform alter's. Note the generated script below only executes the alter if the object does not exist.
PRINT N'Altering [dbo].[AccuCastCustom_DistinctValueCountsPDE]' GO IF OBJECT_ID(N'[dbo].[AccuCastCustom_DistinctValueCountsPDE]', 'P') IS NULL EXEC sp_executesql N' -- ============================================= -- Author: Mike -- Create date: 7/10/14 -- Description: This stored procedure returns a count of various distinct values. -- [mmason] 9/8/14 Added @StartDate & @EndDate -- ============================================= ALTER PROCEDURE [dbo].[AccuCastCustom_DistinctValueCountsPDE]
Comments
We've logged this issue as a bug SC-7610.
I have meetings with product management on Fridays, so I'll get an update from them at that point.
Are you okay with using v10 for now or not using that comparison option?
Product Support
Redgate Software Ltd.
E-mail: support@red-gate.com
Redgate Software
"...
PRINT N'Altering [dbo].[function_x]'
GO
IF NOT EXISTS (SELECT 1 FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[function_x]') AND (type = 'IF' OR type = 'FN' OR type = 'TF'))
EXEC sp_executesql N'/* ..."
Redgate Software