Project

General

Profile

CreateEneraptorDatabasebackup » History » Version 6

Aleksander Bešir, 28.12.2010 13:47

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