IF exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[FK_Make_Kala_KalaId]') and OBJECTPROPERTY(id, N'IsForeignKey') = 1)
ALTER TABLE [dbo].[Make_Kala] DROP CONSTRAINT FK_Make_Kala_KalaId

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[ChangeGoodsCode]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
drop procedure [dbo].[ChangeGoodsCode]