-- -- PostgreSQL database dump -- SET client_encoding = 'SQL_ASCII'; SET check_function_bodies = false; SET client_min_messages = warning; -- -- Name: SCHEMA public; Type: COMMENT; Schema: -; Owner: postgres -- COMMENT ON SCHEMA public IS 'Standard public schema'; SET search_path = public, pg_catalog; -- -- Name: app_action; Type: TABLE; Schema: public; Owner: postgres; Tablespace: -- CREATE TABLE app_action ( row_id serial NOT NULL, row_entry_date timestamp with time zone NOT NULL default now(), row_update_date timestamp with time zone NOT NULL default now(), test_id integer NOT NULL, type_id integer NOT NULL, active boolean, done_date timestamp without time zone, wait_interval integer, ignore boolean ); ALTER TABLE public.app_action OWNER TO postgres; -- -- Name: app_action_type; Type: TABLE; Schema: public; Owner: postgres; Tablespace: -- CREATE TABLE app_action_type ( row_id serial NOT NULL, row_entry_date timestamp with time zone NOT NULL default now(), row_update_date timestamp with time zone NOT NULL default now(), type_name character varying(30) NOT NULL, description character varying(1000) ); ALTER TABLE public.app_action_type OWNER TO postgres; -- -- Name: app_group; Type: TABLE; Schema: public; Owner: postgres; Tablespace: -- CREATE TABLE app_group ( row_id serial NOT NULL, row_entry_date timestamp with time zone NOT NULL default now(), row_update_date timestamp with time zone NOT NULL default now(), app_group_name character varying(50) ); ALTER TABLE public.app_group OWNER TO postgres; -- -- Name: app_message; Type: TABLE; Schema: public; Owner: postgres; Tablespace: -- CREATE TABLE app_message ( row_id serial NOT NULL, row_entry_date timestamp with time zone NOT NULL default now(), row_update_date timestamp with time zone NOT NULL default now(), app_message_subject character varying(200), app_message_content character varying(500) ); ALTER TABLE public.app_message OWNER TO postgres; -- -- Name: app_user; Type: TABLE; Schema: public; Owner: postgres; Tablespace: -- CREATE TABLE app_user ( row_id serial NOT NULL, row_entry_date timestamp with time zone NOT NULL default now(), row_update_date timestamp with time zone NOT NULL default now(), app_user_name character varying(50), email character varying(50) ); ALTER TABLE public.app_user OWNER TO postgres; -- -- Name: app_user_group; Type: TABLE; Schema: public; Owner: postgres; Tablespace: -- CREATE TABLE app_user_group ( row_id serial NOT NULL, row_entry_date timestamp with time zone NOT NULL default now(), row_update_date timestamp with time zone NOT NULL default now(), app_user_id integer NOT NULL, app_group_id integer NOT NULL ); ALTER TABLE public.app_user_group OWNER TO postgres; -- -- Name: email; Type: TABLE; Schema: public; Owner: postgres; Tablespace: -- CREATE TABLE email ( row_id serial NOT NULL, row_entry_date timestamp with time zone NOT NULL default now(), row_update_date timestamp with time zone NOT NULL default now(), app_action_id integer NOT NULL, app_message_importance character varying(10), app_message_id integer NOT NULL, app_group_id integer NOT NULL, app_user_id integer NOT NULL ); ALTER TABLE public.email OWNER TO postgres; -- -- Name: test; Type: TABLE; Schema: public; Owner: postgres; Tablespace: -- CREATE TABLE test ( row_id serial NOT NULL, row_entry_date timestamp with time zone NOT NULL default now(), row_update_date timestamp with time zone NOT NULL default now(), sensor_id integer NOT NULL, type_id integer NOT NULL, active boolean, recurring boolean, eff_begin_date timestamp without time zone, eff_end_date timestamp without time zone, done_date timestamp without time zone, wait_interval integer, passed boolean, latest_m_value double precision, ignore boolean ); ALTER TABLE public.test OWNER TO postgres; -- -- Name: test_attr; Type: TABLE; Schema: public; Owner: postgres; Tablespace: -- CREATE TABLE test_attr ( row_id serial NOT NULL, row_entry_date timestamp with time zone NOT NULL default now(), row_update_date timestamp with time zone NOT NULL default now(), test_id integer NOT NULL, attr_name character varying(30), attr_value character varying(30) ); ALTER TABLE public.test_attr OWNER TO postgres; -- -- Name: test_type; Type: TABLE; Schema: public; Owner: postgres; Tablespace: -- CREATE TABLE test_type ( row_id serial NOT NULL, row_entry_date timestamp with time zone NOT NULL default now(), row_update_date timestamp with time zone NOT NULL default now(), type_name character varying(30) NOT NULL, description character varying(1000), required_attr character varying(60) ); ALTER TABLE public.test_type OWNER TO postgres; -- ALTER TABLE ONLY app_action ADD CONSTRAINT app_action_pkey PRIMARY KEY (row_id); ALTER INDEX public.app_action_pkey OWNER TO postgres; -- -- Name: app_action_type_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: -- ALTER TABLE ONLY app_action_type ADD CONSTRAINT app_action_type_pkey PRIMARY KEY (row_id); ALTER INDEX public.app_action_type_pkey OWNER TO postgres; -- -- Name: app_group_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: -- ALTER TABLE ONLY app_group ADD CONSTRAINT app_group_pkey PRIMARY KEY (row_id); ALTER INDEX public.app_group_pkey OWNER TO postgres; -- -- Name: app_message_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: -- ALTER TABLE ONLY app_message ADD CONSTRAINT app_message_pkey PRIMARY KEY (row_id); ALTER INDEX public.app_message_pkey OWNER TO postgres; -- -- Name: app_user_group_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: -- ALTER TABLE ONLY app_user_group ADD CONSTRAINT app_user_group_pkey PRIMARY KEY (row_id); ALTER INDEX public.app_user_group_pkey OWNER TO postgres; -- -- Name: app_user_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: -- ALTER TABLE ONLY app_user ADD CONSTRAINT app_user_pkey PRIMARY KEY (row_id); ALTER INDEX public.app_user_pkey OWNER TO postgres; -- -- Name: email_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: -- ALTER TABLE ONLY email ADD CONSTRAINT email_pkey PRIMARY KEY (row_id); ALTER INDEX public.email_pkey OWNER TO postgres; -- -- Name: test_attr_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: -- ALTER TABLE ONLY test_attr ADD CONSTRAINT test_attr_pkey PRIMARY KEY (row_id); ALTER INDEX public.test_attr_pkey OWNER TO postgres; -- -- Name: test_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: -- ALTER TABLE ONLY test ADD CONSTRAINT test_pkey PRIMARY KEY (row_id); ALTER INDEX public.test_pkey OWNER TO postgres; -- -- Name: test_type_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: -- ALTER TABLE ONLY test_type ADD CONSTRAINT test_type_pkey PRIMARY KEY (row_id); ALTER INDEX public.test_type_pkey OWNER TO postgres; -- -- Name: app_action_test_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres -- ALTER TABLE ONLY app_action ADD CONSTRAINT app_action_test_id_fkey FOREIGN KEY (test_id) REFERENCES test(row_id); -- -- Name: app_action_type_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres -- ALTER TABLE ONLY app_action ADD CONSTRAINT app_action_type_id_fkey FOREIGN KEY (type_id) REFERENCES app_action_type(row_id); -- -- Name: app_user_group_app_group_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres -- ALTER TABLE ONLY app_user_group ADD CONSTRAINT app_user_group_app_group_id_fkey FOREIGN KEY (app_group_id) REFERENCES app_group(row_id); -- -- Name: app_user_group_app_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres -- ALTER TABLE ONLY app_user_group ADD CONSTRAINT app_user_group_app_user_id_fkey FOREIGN KEY (app_user_id) REFERENCES app_user(row_id); -- -- Name: email_app_action_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres -- ALTER TABLE ONLY email ADD CONSTRAINT email_app_action_id_fkey FOREIGN KEY (app_action_id) REFERENCES app_action(row_id); -- -- Name: email_app_group_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres -- ALTER TABLE ONLY email ADD CONSTRAINT email_app_group_id_fkey FOREIGN KEY (app_group_id) REFERENCES app_group(row_id); -- -- Name: email_app_message_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres -- ALTER TABLE ONLY email ADD CONSTRAINT email_app_message_id_fkey FOREIGN KEY (app_message_id) REFERENCES app_message(row_id); -- -- Name: email_app_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres -- ALTER TABLE ONLY email ADD CONSTRAINT email_app_user_id_fkey FOREIGN KEY (app_user_id) REFERENCES app_user(row_id); -- -- Name: test_attr_test_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres -- ALTER TABLE ONLY test_attr ADD CONSTRAINT test_attr_test_id_fkey FOREIGN KEY (test_id) REFERENCES test(row_id); -- -- Name: test_sensor_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres -- ALTER TABLE ONLY test ADD CONSTRAINT test_sensor_id_fkey FOREIGN KEY (sensor_id) REFERENCES sensor(row_id); -- -- Name: test_type_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres -- ALTER TABLE ONLY test ADD CONSTRAINT test_type_id_fkey FOREIGN KEY (type_id) REFERENCES test_type(row_id); -- -- Name: public; Type: ACL; Schema: -; Owner: postgres -- REVOKE ALL ON SCHEMA public FROM PUBLIC; REVOKE ALL ON SCHEMA public FROM postgres; GRANT ALL ON SCHEMA public TO postgres; GRANT ALL ON SCHEMA public TO PUBLIC; -- -- PostgreSQL database dump complete --