IF  EXISTS (SELECT * FROM sys.foreign_keys WHERE object_id = OBJECT_ID(N'[IES].[FK_T_PLAN_CLASSIFICATION_T_ITEM_FACT_PlanClassificationNoFk]') AND parent_object_id = OBJECT_ID(N'[IES].[T_ITEM_FACT]'))
ALTER TABLE [IES].[T_ITEM_FACT] DROP CONSTRAINT [FK_T_PLAN_CLASSIFICATION_T_ITEM_FACT_PlanClassificationNoFk]
GO

IF  EXISTS (SELECT * FROM sys.foreign_keys WHERE object_id = OBJECT_ID(N'[IES].[FK_T_PLAN_CLASSIFICATION_T_ITEM_PLAN_PlanClassificationNoFk]') AND parent_object_id = OBJECT_ID(N'[IES].[T_ITEM_PLAN]'))
ALTER TABLE [IES].[T_ITEM_PLAN] DROP CONSTRAINT [FK_T_PLAN_CLASSIFICATION_T_ITEM_PLAN_PlanClassificationNoFk]
GO
