
DO $$ 
    BEGIN
          IF EXISTS (SELECT "Id" FROM public."Versions" WHERE "Build">=1765) THEN
		RETURN;
          END IF;
        BEGIN
            ALTER TABLE public."Roles" ADD "OwnerId" bigint NULL;
        EXCEPTION
            WHEN duplicate_column THEN RAISE NOTICE 'column OwnerId already exists in <Roles>.';
        END;
    END;
$$


