DO $$ 
    BEGIN
        BEGIN
          IF EXISTS (SELECT "Id" FROM public."Versions" WHERE "Build">=1765) THEN
		RETURN;
          END IF;

            ALTER TABLE public."Roles"   ADD "ParentId" bigint;
            ALTER TABLE public."Roles"   ADD  "ExternalId" character varying(64);
        EXCEPTION
            WHEN duplicate_column THEN RAISE NOTICE 'column ExternalId already exists in <Roles>.';
        END;
    END;
$$


