if object_id('DF_UnitOrganizations_IsEndUnit','D') is not null
begin
	ALTER TABLE [dbo].[UnitOrganizations] DROP CONSTRAINT [DF_UnitOrganizations_IsEndUnit]
end 

if exists(selecT 1 from sys.columns where object_id=object_id('UnitOrganizations') and name like 'IsEndUnit')
begin
	ALTER TABLE UnitOrganizations DROP COLUMN IsEndUnit 
end 
