CreateEneraptorDatabasebackup » History » Version 1
Aleksander Bešir, 28.12.2010 13:43
1 | 1 | Aleksander Bešir | <pre> |
---|---|---|---|
2 | -- |
||
3 | -- PostgreSQL database dump |
||
4 | -- |
||
5 | |||
6 | -- Dumped from database version 9.0.1 |
||
7 | -- Dumped by pg_dump version 9.0.1 |
||
8 | -- Started on 2010-12-28 12:36:32 |
||
9 | |||
10 | SET statement_timeout = 0; |
||
11 | SET client_encoding = 'UTF8'; |
||
12 | SET standard_conforming_strings = off; |
||
13 | SET check_function_bodies = false; |
||
14 | SET client_min_messages = warning; |
||
15 | SET escape_string_warning = off; |
||
16 | |||
17 | -- |
||
18 | -- TOC entry 1794 (class 1262 OID 16392) |
||
19 | -- Name: eneraptor-db; Type: DATABASE; Schema: -; Owner: postgres |
||
20 | -- |
||
21 | |||
22 | CREATE DATABASE "eneraptor-db" WITH TEMPLATE = template0 ENCODING = 'UTF8' LC_COLLATE = 'Slovenian_Slovenia.1250' LC_CTYPE = 'Slovenian_Slovenia.1250'; |
||
23 | |||
24 | |||
25 | ALTER DATABASE "eneraptor-db" OWNER TO postgres; |
||
26 | |||
27 | \connect "eneraptor-db" |
||
28 | |||
29 | SET statement_timeout = 0; |
||
30 | SET client_encoding = 'UTF8'; |
||
31 | SET standard_conforming_strings = off; |
||
32 | SET check_function_bodies = false; |
||
33 | SET client_min_messages = warning; |
||
34 | SET escape_string_warning = off; |
||
35 | |||
36 | -- |
||
37 | -- TOC entry 1795 (class 1262 OID 16392) |
||
38 | -- Dependencies: 1794 |
||
39 | -- Name: eneraptor-db; Type: COMMENT; Schema: -; Owner: postgres |
||
40 | -- |
||
41 | |||
42 | COMMENT ON DATABASE "eneraptor-db" IS 'Test DB for eneraptor'; |
||
43 | |||
44 | |||
45 | -- |
||
46 | -- TOC entry 312 (class 2612 OID 11574) |
||
47 | -- Name: plpgsql; Type: PROCEDURAL LANGUAGE; Schema: -; Owner: postgres |
||
48 | -- |
||
49 | |||
50 | CREATE OR REPLACE PROCEDURAL LANGUAGE plpgsql; |
||
51 | |||
52 | |||
53 | ALTER PROCEDURAL LANGUAGE plpgsql OWNER TO postgres; |
||
54 | |||
55 | SET search_path = public, pg_catalog; |
||
56 | |||
57 | -- |
||
58 | -- TOC entry 1506 (class 1259 OID 25180) |
||
59 | -- Dependencies: 5 |
||
60 | -- Name: hibernate_sequence; Type: SEQUENCE; Schema: public; Owner: eneraptor-hci |
||
61 | -- |
||
62 | |||
63 | CREATE SEQUENCE hibernate_sequence |
||
64 | START WITH 1 |
||
65 | INCREMENT BY 1 |
||
66 | NO MINVALUE |
||
67 | NO MAXVALUE |
||
68 | CACHE 1; |
||
69 | |||
70 | |||
71 | ALTER TABLE public.hibernate_sequence OWNER TO "eneraptor-hci"; |
||
72 | |||
73 | -- |
||
74 | -- TOC entry 1798 (class 0 OID 0) |
||
75 | -- Dependencies: 1506 |
||
76 | -- Name: hibernate_sequence; Type: SEQUENCE SET; Schema: public; Owner: eneraptor-hci |
||
77 | -- |
||
78 | |||
79 | SELECT pg_catalog.setval('hibernate_sequence', 5, true); |
||
80 | |||
81 | |||
82 | SET default_tablespace = ''; |
||
83 | |||
84 | SET default_with_oids = false; |
||
85 | |||
86 | -- |
||
87 | -- TOC entry 1504 (class 1259 OID 25162) |
||
88 | -- Dependencies: 5 |
||
89 | -- Name: internal_config; Type: TABLE; Schema: public; Owner: eneraptor-hci; Tablespace: |
||
90 | -- |
||
91 | |||
92 | CREATE TABLE internal_config ( |
||
93 | id bigint NOT NULL, |
||
94 | version bigint NOT NULL, |
||
95 | config_id character varying(255) NOT NULL, |
||
96 | config_val character varying(255) |
||
97 | ); |
||
98 | |||
99 | |||
100 | ALTER TABLE public.internal_config OWNER TO "eneraptor-hci"; |
||
101 | |||
102 | -- |
||
103 | -- TOC entry 1505 (class 1259 OID 25172) |
||
104 | -- Dependencies: 5 |
||
105 | -- Name: logged_data; Type: TABLE; Schema: public; Owner: eneraptor-hci; Tablespace: |
||
106 | -- |
||
107 | |||
108 | CREATE TABLE logged_data ( |
||
109 | id bigint NOT NULL, |
||
110 | version bigint NOT NULL, |
||
111 | date_recieved timestamp without time zone NOT NULL, |
||
112 | device_id character varying(255) NOT NULL, |
||
113 | reported_data character varying(256) NOT NULL |
||
114 | ); |
||
115 | |||
116 | |||
117 | ALTER TABLE public.logged_data OWNER TO "eneraptor-hci"; |
||
118 | |||
119 | -- |
||
120 | -- TOC entry 1790 (class 0 OID 25162) |
||
121 | -- Dependencies: 1504 |
||
122 | -- Data for Name: internal_config; Type: TABLE DATA; Schema: public; Owner: eneraptor-hci |
||
123 | -- |
||
124 | |||
125 | COPY internal_config (id, version, config_id, config_val) FROM stdin; |
||
126 | 1 0 hci-version 0.10.12.26 |
||
127 | 2 0 super-admin admin |
||
128 | 3 0 super-pass pass |
||
129 | 4 0 logic-ip 127.0.0.1 |
||
130 | 5 0 logic-port 80 |
||
131 | \. |
||
132 | |||
133 | |||
134 | -- |
||
135 | -- TOC entry 1791 (class 0 OID 25172) |
||
136 | -- Dependencies: 1505 |
||
137 | -- Data for Name: logged_data; Type: TABLE DATA; Schema: public; Owner: eneraptor-hci |
||
138 | -- |
||
139 | |||
140 | COPY logged_data (id, version, date_recieved, device_id, reported_data) FROM stdin; |
||
141 | \. |
||
142 | |||
143 | |||
144 | -- |
||
145 | -- TOC entry 1785 (class 2606 OID 25171) |
||
146 | -- Dependencies: 1504 1504 |
||
147 | -- Name: internal_config_config_id_key; Type: CONSTRAINT; Schema: public; Owner: eneraptor-hci; Tablespace: |
||
148 | -- |
||
149 | |||
150 | ALTER TABLE ONLY internal_config |
||
151 | ADD CONSTRAINT internal_config_config_id_key UNIQUE (config_id); |
||
152 | |||
153 | |||
154 | -- |
||
155 | -- TOC entry 1787 (class 2606 OID 25169) |
||
156 | -- Dependencies: 1504 1504 |
||
157 | -- Name: internal_config_pkey; Type: CONSTRAINT; Schema: public; Owner: eneraptor-hci; Tablespace: |
||
158 | -- |
||
159 | |||
160 | ALTER TABLE ONLY internal_config |
||
161 | ADD CONSTRAINT internal_config_pkey PRIMARY KEY (id); |
||
162 | |||
163 | |||
164 | -- |
||
165 | -- TOC entry 1789 (class 2606 OID 25179) |
||
166 | -- Dependencies: 1505 1505 |
||
167 | -- Name: logged_data_pkey; Type: CONSTRAINT; Schema: public; Owner: eneraptor-hci; Tablespace: |
||
168 | -- |
||
169 | |||
170 | ALTER TABLE ONLY logged_data |
||
171 | ADD CONSTRAINT logged_data_pkey PRIMARY KEY (id); |
||
172 | |||
173 | |||
174 | -- |
||
175 | -- TOC entry 1797 (class 0 OID 0) |
||
176 | -- Dependencies: 5 |
||
177 | -- Name: public; Type: ACL; Schema: -; Owner: postgres |
||
178 | -- |
||
179 | |||
180 | REVOKE ALL ON SCHEMA public FROM PUBLIC; |
||
181 | REVOKE ALL ON SCHEMA public FROM postgres; |
||
182 | GRANT ALL ON SCHEMA public TO postgres; |
||
183 | GRANT ALL ON SCHEMA public TO PUBLIC; |
||
184 | |||
185 | |||
186 | -- Completed on 2010-12-28 12:36:33 |
||
187 | |||
188 | -- |
||
189 | -- PostgreSQL database dump complete |
||
190 | -- |
||
191 | </pre> |