-- PW-761

-- v_categorytree
DROP INDEX IF EXISTS public.v_categorytree_key;
CREATE UNIQUE INDEX v_categorytree_key
    ON public.v_categorytree
    USING btree
    (id);

-- v_esales_category_count
DROP INDEX IF EXISTS public.v_esales_category_count_id_idx;
CREATE UNIQUE INDEX v_esales_category_count_id_idx
    ON public.v_esales_category_count
    USING btree
    (id, locale_id, product_id, groupid, wallpapertype_id);

-- v_esales_categorytree_i18n
DROP INDEX IF EXISTS public.v_esales_categorytree_i18n_id_locale_id;
CREATE UNIQUE INDEX v_esales_categorytree_i18n_id_locale_id
    ON public.v_esales_categorytree_i18n
    USING btree
    (id, locale_id);

-- v_esales_interiors
DROP INDEX IF EXISTS public.ix_v_esales_interiors_print_id;
CREATE INDEX ix_v_esales_interiors_print_id
    ON public.v_esales_interiors
    USING btree
    (print_id);

-- v_esales_printproduct
DROP INDEX IF EXISTS public.v_esales_printproduct_id;
CREATE UNIQUE INDEX v_esales_printproduct_id
    ON public.v_esales_printproduct
    USING btree
    (id);

DROP INDEX IF EXISTS public.v_esales_printproduct_product_id;
CREATE INDEX v_esales_printproduct_product_id
    ON public.v_esales_printproduct
    USING btree
    (product_id);

-- v_esales_product
DROP INDEX IF EXISTS public.v_esales_product_id;
CREATE UNIQUE INDEX v_esales_product_id
    ON public.v_esales_product
    USING btree
    (id);
