SET search_path=vrevisions_trunk,public;

CREATE INDEX contour_objects_geom_09_the_geom_domain_service_attrs_idx
    ON contour_objects_geom_09
    USING gist (the_geom, domain_attrs, service_attrs);

CREATE INDEX contour_objects_geom_10_the_geom_domain_service_attrs_idx
    ON contour_objects_geom_10
    USING gist (the_geom, domain_attrs, service_attrs);

CREATE INDEX contour_objects_geom_11_the_geom_domain_service_attrs_idx
    ON contour_objects_geom_11
    USING gist (the_geom, domain_attrs, service_attrs);

CREATE INDEX contour_objects_geom_12_the_geom_domain_service_attrs_idx
    ON contour_objects_geom_12
    USING gist (the_geom, domain_attrs, service_attrs);

CREATE INDEX contour_objects_geom_13_the_geom_domain_service_attrs_idx
    ON contour_objects_geom_13
    USING gist (the_geom, domain_attrs, service_attrs);

CREATE INDEX contour_objects_geom_14_the_geom_domain_service_attrs_idx
    ON contour_objects_geom_14
    USING gist (the_geom, domain_attrs, service_attrs);


SELECT vrevisions.for_vrevisions('
    DROP INDEX IF EXISTS contour_objects_geom_09_domain_attrs_gist;
    DROP INDEX IF EXISTS contour_objects_geom_09_service_attrs_gist;
    DROP INDEX IF EXISTS contour_objects_geom_09_the_geom_domain_attrs_index;
    DROP INDEX IF EXISTS contour_objects_geom_09_the_geom_index;

    DROP INDEX IF EXISTS contour_objects_geom_10_domain_attrs_gist;
    DROP INDEX IF EXISTS contour_objects_geom_10_service_attrs_gist;
    DROP INDEX IF EXISTS contour_objects_geom_10_the_geom_domain_attrs_index;
    DROP INDEX IF EXISTS contour_objects_geom_10_the_geom_index;

    DROP INDEX IF EXISTS contour_objects_geom_11_domain_attrs_gist;
    DROP INDEX IF EXISTS contour_objects_geom_11_service_attrs_gist;
    DROP INDEX IF EXISTS contour_objects_geom_11_the_geom_domain_attrs_index;
    DROP INDEX IF EXISTS contour_objects_geom_11_the_geom_index;

    DROP INDEX IF EXISTS contour_objects_geom_12_domain_attrs_gist;
    DROP INDEX IF EXISTS contour_objects_geom_12_service_attrs_gist;
    DROP INDEX IF EXISTS contour_objects_geom_12_the_geom_domain_attrs_index;
    DROP INDEX IF EXISTS contour_objects_geom_12_the_geom_index;

    DROP INDEX IF EXISTS contour_objects_geom_13_domain_attrs_gist;
    DROP INDEX IF EXISTS contour_objects_geom_13_service_attrs_gist;
    DROP INDEX IF EXISTS contour_objects_geom_13_the_geom_domain_attrs_index;
    DROP INDEX IF EXISTS contour_objects_geom_13_the_geom_index;

    DROP INDEX IF EXISTS contour_objects_geom_14_domain_attrs_gist;
    DROP INDEX IF EXISTS contour_objects_geom_14_service_attrs_gist;
    DROP INDEX IF EXISTS contour_objects_geom_14_the_geom_domain_attrs_index;
    DROP INDEX IF EXISTS contour_objects_geom_14_the_geom_index;


    DROP INDEX IF EXISTS contour_objects_geom_domain_attrs_gist;
    DROP INDEX IF EXISTS contour_objects_geom_object_id_index;
    DROP INDEX IF EXISTS contour_objects_geom_service_attrs_gist;
    DROP INDEX IF EXISTS contour_objects_geom_the_geom_domain_attrs_index;
    DROP INDEX IF EXISTS contour_objects_geom_the_geom_index;
    DROP INDEX IF EXISTS contour_objects_geom_zmax_index;
    DROP INDEX IF EXISTS contour_objects_geom_zmin_index;

    DROP INDEX IF EXISTS contour_objects_geom_tmp_domain_attrs_idx;
    DROP INDEX IF EXISTS contour_objects_geom_tmp_object_id_idx;
    DROP INDEX IF EXISTS contour_objects_geom_tmp_service_attrs_idx;
    DROP INDEX IF EXISTS contour_objects_geom_tmp_the_geom_domain_attrs_idx;
    DROP INDEX IF EXISTS contour_objects_geom_tmp_the_geom_idx;
    DROP INDEX IF EXISTS contour_objects_geom_tmp_zmax_idx;
    DROP INDEX IF EXISTS contour_objects_geom_tmp_zmin_idx;

    DROP INDEX IF EXISTS contour_objects_geom_tmp_domain_attrs_idx1;
    DROP INDEX IF EXISTS contour_objects_geom_tmp_object_id_idx1;
    DROP INDEX IF EXISTS contour_objects_geom_tmp_service_attrs_idx1;
    DROP INDEX IF EXISTS contour_objects_geom_tmp_the_geom_domain_attrs_idx1;
    DROP INDEX IF EXISTS contour_objects_geom_tmp_the_geom_idx1;
    DROP INDEX IF EXISTS contour_objects_geom_tmp_zmax_idx1;
    DROP INDEX IF EXISTS contour_objects_geom_tmp_zmin_idx1;
');
