IF NOT EXISTS (SELECT 1 FROM [sys].[default_constraints] WHERE [parent_object_id] = OBJECT_ID(N'[dbo].[Repository]') AND [name] = N'DF_Repository_RepositoryType')
    ALTER TABLE [dbo].[Repository] ADD CONSTRAINT [DF_Repository_RepositoryType] DEFAULT (0) FOR [RepositoryType];