if not exists (select * from sys.syscolumns where name = 'SortPriority' and id = object_id(N'dbo.Connections'))
    alter table dbo.Connections add SortPriority int not null constraint DF_Connections_SortPriority default (0);