DO $$ 
    BEGIN
        BEGIN
          IF EXISTS (SELECT "Id" FROM public."Versions" WHERE "Build">=1765) THEN
		RETURN;
          END IF;
            ALTER table public."AuthUserActions" DROP COLUMN "UserId";
            ALTER table public."AuthUserActions" ADD "UserId" bigint,ADD "Login" character varying(64) NOT NULL DEFAULT('');
        EXCEPTION
            WHEN duplicate_column THEN RAISE NOTICE 'column UserId already exists in <AuthUserActions>.';
        END;
    END;
$$





