DO $$ 
    BEGIN
        BEGIN
          IF EXISTS (SELECT "Id" FROM public."Versions" WHERE "Build">=1765) THEN
		RETURN;
          END IF; 
CREATE INDEX "IDX_Users_ContactId-CustomerId-Type-Status-Gender"
    ON public."Users" USING btree
    ("ContactId" ASC NULLS LAST,"CustomerId" ASC NULLS LAST,"Type" ASC NULLS LAST,"Status" ASC NULLS LAST,"Gender" ASC NULLS LAST)
    TABLESPACE pg_default; 


        EXCEPTION
            WHEN duplicate_column THEN RAISE NOTICE 'index <IDX_Users_ContactId-CustomerId-Type-Status-Gender> already exists in <Users>.';
        END;
    END;
$$
