Project

General

Profile

CreateEneraptorDatabasebackup » History » Version 5

Aleksander Bešir, 28.12.2010 13:45

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