Print ''
Print '-------------------------------------------------------------------------'
Print ' Cleanup ProcessData'
Print ' Database.....: #DB_N#'
Print ' Autor........: J.Feuerstein/A.Becker'
Print ' FirstVersion.: 27.02.2018 20:08'
Print ' LastVersion..: 27.02.2018 20:08'
Print '-------------------------------------------------------------------------'
GO
use [#DB_N#]


print('Start repair ObjectGroups_tbl Default 0.....: ' + '#DB_N#')

--
-- ALTER TABLE dbo.ObjectGroups_tbl
-- DROP CONSTRAINT DF_ObjectGroups_tbl_ObjectReferenceCount_ITEM
-- GO

-- ALTER TABLE dbo.ObjectGroups_tbl
-- ADD CONSTRAINT DF_ObjectGroups_tbl_ObjectReferenceCount_ITEM DEFAULT 0 FOR ObjectReferenceCount_ITEM
-- GO
--
-- ALTER TABLE dbo.ObjectGroups_tbl
-- ADD CONSTRAINT DF_ObjectGroups_tbl_ObjectReferenceCount_IR DEFAULT 0 FOR ObjectReferenceCount_IR
-- GO
--
-- ALTER TABLE dbo.ObjectGroups_tbl
-- ADD CONSTRAINT DF_ObjectGroups_tbl_ObjectReferenceCount_DS DEFAULT 0 FOR ObjectReferenceCount_DS
-- GO

Print '-------------------------------------------------------------------------'
Print 'List dbo.ObjectGroups_tbl DefaultValue'

SELECT name, object_definition(default_object_id) AS DefaultValue
FROM   sys.columns
WHERE  object_id = object_id('dbo.ObjectGroups_tbl')

print('Start repair ObjectGroups_tbl Default 0.....: ' + '#DB_N#')

GO

Print ''
Print '-------------------------------------------------------------------------'
Print ' Script executed'
Print '-------------------------------------------------------------------------'
GO
