Project

General

Profile

CreateEneraptorDatabasebackup » History » Revision 5

Revision 4 (Aleksander Bešir, 28.12.2010 13:44) → Revision 5/6 (Aleksander Bešir, 28.12.2010 13:45)

h1. Creating Eneraptor Database for development purposes 

 <pre><code class="sql"> 
 -- 
 -- PostgreSQL database dump 
 -- 

 -- Dumped from database version 9.0.1 
 -- Dumped by pg_dump version 9.0.1 
 -- Started on 2010-12-28 12:36:32 

 SET statement_timeout = 0; 
 SET client_encoding = 'UTF8'; 
 SET standard_conforming_strings = off; 
 SET check_function_bodies = false; 
 SET client_min_messages = warning; 
 SET escape_string_warning = off; 

 -- 
 -- TOC entry 1794 (class 1262 OID 16392) 
 -- Name: eneraptor-db; Type: DATABASE; Schema: -; Owner: postgres 
 -- 

 CREATE DATABASE "eneraptor-db" WITH TEMPLATE = template0 ENCODING = 'UTF8' LC_COLLATE = 'Slovenian_Slovenia.1250' LC_CTYPE = 'Slovenian_Slovenia.1250'; 


 ALTER DATABASE "eneraptor-db" OWNER TO postgres; 

 \connect "eneraptor-db" 

 SET statement_timeout = 0; 
 SET client_encoding = 'UTF8'; 
 SET standard_conforming_strings = off; 
 SET check_function_bodies = false; 
 SET client_min_messages = warning; 
 SET escape_string_warning = off; 

 -- 
 -- TOC entry 1795 (class 1262 OID 16392) 
 -- Dependencies: 1794 
 -- Name: eneraptor-db; Type: COMMENT; Schema: -; Owner: postgres 
 -- 

 COMMENT ON DATABASE "eneraptor-db" IS 'Test DB for eneraptor'; 


 -- 
 -- TOC entry 312 (class 2612 OID 11574) 
 -- Name: plpgsql; Type: PROCEDURAL LANGUAGE; Schema: -; Owner: postgres 
 -- 

 CREATE OR REPLACE PROCEDURAL LANGUAGE plpgsql; 


 ALTER PROCEDURAL LANGUAGE plpgsql OWNER TO postgres; 

 SET search_path = public, pg_catalog; 

 -- 
 -- TOC entry 1506 (class 1259 OID 25180) 
 -- Dependencies: 5 
 -- Name: hibernate_sequence; Type: SEQUENCE; Schema: public; Owner: eneraptor-hci 
 -- 

 CREATE SEQUENCE hibernate_sequence 
     START WITH 1 
     INCREMENT BY 1 
     NO MINVALUE 
     NO MAXVALUE 
     CACHE 1; 


 ALTER TABLE public.hibernate_sequence OWNER TO "eneraptor-hci"; 

 -- 
 -- TOC entry 1798 (class 0 OID 0) 
 -- Dependencies: 1506 
 -- Name: hibernate_sequence; Type: SEQUENCE SET; Schema: public; Owner: eneraptor-hci 
 -- 

 SELECT pg_catalog.setval('hibernate_sequence', 5, true); 


 SET default_tablespace = ''; 

 SET default_with_oids = false; 

 -- 
 -- TOC entry 1504 (class 1259 OID 25162) 
 -- Dependencies: 5 
 -- Name: internal_config; Type: TABLE; Schema: public; Owner: eneraptor-hci; Tablespace:  
 -- 

 CREATE TABLE internal_config ( 
     id bigint NOT NULL, 
     version bigint NOT NULL, 
     config_id character varying(255) NOT NULL, 
     config_val character varying(255) 
 ); 


 ALTER TABLE public.internal_config OWNER TO "eneraptor-hci"; 

 -- 
 -- TOC entry 1505 (class 1259 OID 25172) 
 -- Dependencies: 5 
 -- Name: logged_data; Type: TABLE; Schema: public; Owner: eneraptor-hci; Tablespace:  
 -- 

 CREATE TABLE logged_data ( 
     id bigint NOT NULL, 
     version bigint NOT NULL, 
     date_recieved timestamp without time zone NOT NULL, 
     device_id character varying(255) NOT NULL, 
     reported_data character varying(256) NOT NULL 
 ); 


 ALTER TABLE public.logged_data OWNER TO "eneraptor-hci"; 

 -- 
 -- TOC entry 1790 (class 0 OID 25162) 
 -- Dependencies: 1504 
 -- Data for Name: internal_config; Type: TABLE DATA; Schema: public; Owner: eneraptor-hci 
 -- 

 COPY internal_config (id, version, config_id, config_val) FROM stdin; 
 1 	 0 	 hci-version 	 0.10.12.26 
 2 	 0 	 super-admin 	 admin 
 3 	 0 	 super-pass 	 pass 
 4 	 0 	 logic-ip 	 127.0.0.1 
 5 	 0 	 logic-port 	 80 
 \. 


 -- 
 -- TOC entry 1791 (class 0 OID 25172) 
 -- Dependencies: 1505 
 -- Data for Name: logged_data; Type: TABLE DATA; Schema: public; Owner: eneraptor-hci 
 -- 

 COPY logged_data (id, version, date_recieved, device_id, reported_data) FROM stdin; 
 \. 


 -- 
 -- TOC entry 1785 (class 2606 OID 25171) 
 -- Dependencies: 1504 1504 
 -- Name: internal_config_config_id_key; Type: CONSTRAINT; Schema: public; Owner: eneraptor-hci; Tablespace:  
 -- 

 ALTER TABLE ONLY internal_config 
     ADD CONSTRAINT internal_config_config_id_key UNIQUE (config_id); 


 -- 
 -- TOC entry 1787 (class 2606 OID 25169) 
 -- Dependencies: 1504 1504 
 -- Name: internal_config_pkey; Type: CONSTRAINT; Schema: public; Owner: eneraptor-hci; Tablespace:  
 -- 

 ALTER TABLE ONLY internal_config 
     ADD CONSTRAINT internal_config_pkey PRIMARY KEY (id); 


 -- 
 -- TOC entry 1789 (class 2606 OID 25179) 
 -- Dependencies: 1505 1505 
 -- Name: logged_data_pkey; Type: CONSTRAINT; Schema: public; Owner: eneraptor-hci; Tablespace:  
 -- 

 ALTER TABLE ONLY logged_data 
     ADD CONSTRAINT logged_data_pkey PRIMARY KEY (id); 


 -- 
 -- TOC entry 1797 (class 0 OID 0) 
 -- Dependencies: 5 
 -- 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; 


 -- Completed on 2010-12-28 12:36:33 

 -- 
 -- PostgreSQL database dump complete 
 -- 
 </code></pre>