if not exists (select * FROM sys.syscolumns where name = 'UserInfo' AND id = object_id(N'dbo.UserGroupInfo')) 
    alter table dbo.UserGroupInfo add constraint FK_UserGroupInfo_UserInfoID foreign key (UserInfoID) references dbo.UserAccount(ID);