if not exists (select * FROM sys.syscolumns where name = 'ModifiedDate' AND id = object_id(N'dbo.Todo')) BEGIN
    alter table dbo.Todo ADD ModifiedDate datetime NULL 
END;                
            
if not exists (select * FROM sys.sysobjects where id = object_id(N'dbo.TodoUsers')) BEGIN
    create table dbo.TodoUsers
    (
        TodoUsersID uniqueidentifier default newid() NOT NULL,
        TodoUsersTodoID uniqueidentifier NOT NULL,
        TodoUsersConnectionID uniqueidentifier NOT NULL,
        TodoUsersUserInfoID uniqueidentifier NOT NULL,
        TodoUsersComment nvarchar(MAX) NULL,
        TodoUsersStatus int NOT NULL default 0,
        TodoUsersCreationDate datetime NOT NULL default GETDATE(),
        TodoUsersModifiedDate datetime NULL,
        constraint PK_TodoUsers primary key clustered (TodoUsersID)
    );
end;