if exists (select * from sys.default_constraints where name = 'DF_Attachment_DataSourceID' and parent_object_id = object_id(N'dbo.Attachment'))
    alter table dbo.Attachment drop constraint DF_Attachment_DataSourceID;