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