     LANGUAGE plpgsql;
 
 
-ALTER FUNCTION public.status_get_repeat(status_id integer) OWNER TO postgres;
-
---
--- Name: status_update(); Type: FUNCTION; Schema: public; Owner: postgres
+ALTER FUNCTION spv.status_get_repeat(status_id integer) OWNER TO sjspv;
+
+--
+-- Name: status_update(); Type: FUNCTION; Schema: spv; Owner: postgres
 --
 
 CREATE FUNCTION status_update() RETURNS trigger

    LANGUAGE plpgsql;


ALTER FUNCTION public.new_object(in_og_id integer, in_grp_id integer) OWNER TO postgres;

--
-- Name: object_insert(); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION object_insert() RETURNS trigger

);


ALTER TABLE spv.status OWNER TO sjspv;

--
-- Name: COLUMN status.last_check; Type: COMMENT; Schema: spv; Owner: sjspv
--

COMMENT ON COLUMN status.last_check IS 'When was the check last fetched';


--
-- Name: COLUMN status.next_check; Type: COMMENT; Schema: spv; Owner: sjspv
--

COMMENT ON COLUMN status.next_check IS 'When will the check be performed again';


--
-- Name: checks_list; Type: VIEW; Schema: spv; Owner: sjspv
--

CREATE VIEW checks_list AS
    SELECT checks.plugin_check, checks.plugin, groups.grp_id, status.last_check, status.next_check, status.check_status, status.check_message, status.cg_id, status.og_id, status.seq_id, status.status_id, objects.address, groups.name AS group_name, checks.name AS check_name FROM ((((((status JOIN objects_group ON ((status.og_id = objects_group.og_id))) JOIN objects ON ((objects_group.obj_id = objects.obj_id))) JOIN groups ON ((objects_group.grp_id = groups.grp_id))) JOIN checks_group ON ((status.cg_id = checks_group.cg_id))) JOIN checks ON ((checks_group.chk_id = checks.chk_id))) JOIN groups alias_ppa_1240585188 ON ((checks_group.grp_id = groups.grp_id)));


ALTER TABLE spv.checks_list OWNER TO sjspv;

--
-- Name: groups_increment; Type: SEQUENCE; Schema: spv; Owner: sjspv
--

CREATE SEQUENCE groups_increment
