summaryrefslogtreecommitdiff
path: root/src/YalpInputs/YalpPGSqlInput/db-design-backup.sql
blob: bbdd0d9a9cc2188896089e14e0ac860db300047f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
--
-- PostgreSQL database dump
--

-- Started on 2008-09-25 00:44:25 CEST

SET client_encoding = 'UNICODE';
SET check_function_bodies = false;
SET client_min_messages = warning;

--
-- TOC entry 1520 (class 0 OID 0)
-- Dependencies: 5
-- Name: SCHEMA public; Type: COMMENT; Schema: -; Owner: postgres
--

COMMENT ON SCHEMA public IS 'Standard public schema';


SET search_path = public, pg_catalog;

SET default_tablespace = '';

SET default_with_oids = false;

--
-- TOC entry 1172 (class 1259 OID 17306)
-- Dependencies: 1493 5
-- Name: IntProperties; Type: TABLE; Schema: public; Owner: yalp; Tablespace: 
--

CREATE TABLE "IntProperties" (
    id bigserial NOT NULL,
    description text,
    value integer
);


ALTER TABLE public."IntProperties" OWNER TO yalp;

--
-- TOC entry 1522 (class 0 OID 0)
-- Dependencies: 1171
-- Name: IntProperties_id_seq; Type: SEQUENCE SET; Schema: public; Owner: yalp
--

SELECT pg_catalog.setval(pg_catalog.pg_get_serial_sequence('"IntProperties"', 'id'), 1, false);


--
-- TOC entry 1174 (class 1259 OID 17313)
-- Dependencies: 1494 5
-- Name: Medias; Type: TABLE; Schema: public; Owner: yalp; Tablespace: 
--

CREATE TABLE "Medias" (
    id bigserial NOT NULL,
    "type" character(1),
    path text,
    "fileName" text,
    duration text,
    name text,
    tags text
);


ALTER TABLE public."Medias" OWNER TO yalp;

--
-- TOC entry 1523 (class 0 OID 0)
-- Dependencies: 1173
-- Name: Medias_id_seq; Type: SEQUENCE SET; Schema: public; Owner: yalp
--

SELECT pg_catalog.setval(pg_catalog.pg_get_serial_sequence('"Medias"', 'id'), 2, true);


--
-- TOC entry 1176 (class 1259 OID 17323)
-- Dependencies: 1495 1496 1497 5
-- Name: PropertyConnector; Type: TABLE; Schema: public; Owner: yalp; Tablespace: 
--

CREATE TABLE "PropertyConnector" (
    "mediaId" integer,
    "stringPropertyId" integer DEFAULT 0,
    "intPropertyId" integer DEFAULT 0,
    id bigserial NOT NULL
);


ALTER TABLE public."PropertyConnector" OWNER TO yalp;

--
-- TOC entry 1170 (class 1259 OID 17294)
-- Dependencies: 1492 5
-- Name: StringProperties; Type: TABLE; Schema: public; Owner: yalp; Tablespace: 
--

CREATE TABLE "StringProperties" (
    id bigserial NOT NULL,
    description text,
    value text
);


ALTER TABLE public."StringProperties" OWNER TO yalp;

--
-- TOC entry 1524 (class 0 OID 0)
-- Dependencies: 1169
-- Name: StringProperties_id_seq; Type: SEQUENCE SET; Schema: public; Owner: yalp
--

SELECT pg_catalog.setval(pg_catalog.pg_get_serial_sequence('"StringProperties"', 'id'), 1, false);


--
-- TOC entry 1167 (class 1259 OID 17269)
-- Dependencies: 1490 1491 5
-- Name: Users; Type: TABLE; Schema: public; Owner: yalp; Tablespace: 
--

CREATE TABLE "Users" (
    "level" integer DEFAULT 1 NOT NULL,
    id bigserial NOT NULL,
    name text NOT NULL,
    "realName" text
);


ALTER TABLE public."Users" OWNER TO yalp;

--
-- TOC entry 1525 (class 0 OID 0)
-- Dependencies: 1168
-- Name: Users_id_seq; Type: SEQUENCE SET; Schema: public; Owner: yalp
--

SELECT pg_catalog.setval(pg_catalog.pg_get_serial_sequence('"Users"', 'id'), 1, false);


--
-- TOC entry 1526 (class 0 OID 0)
-- Dependencies: 1175
-- Name: propertyConnector_id_seq; Type: SEQUENCE SET; Schema: public; Owner: yalp
--

SELECT pg_catalog.setval(pg_catalog.pg_get_serial_sequence('"PropertyConnector"', 'id'), 1, false);


--
-- TOC entry 1515 (class 0 OID 17306)
-- Dependencies: 1172
-- Data for Name: IntProperties; Type: TABLE DATA; Schema: public; Owner: yalp
--

COPY "IntProperties" (id, description, value) FROM stdin;
\.


--
-- TOC entry 1516 (class 0 OID 17313)
-- Dependencies: 1174
-- Data for Name: Medias; Type: TABLE DATA; Schema: public; Owner: yalp
--

COPY "Medias" (id, "type", path, "fileName", duration, name, tags) FROM stdin;
1	v	/home/manut	test.avi	5:55	huhu	hihi
2	s	/home/manut	test.mp3	2:22	chavenger - jung und frech	live, hiltensweiler, hihi
\.


--
-- TOC entry 1517 (class 0 OID 17323)
-- Dependencies: 1176
-- Data for Name: PropertyConnector; Type: TABLE DATA; Schema: public; Owner: yalp
--

COPY "PropertyConnector" ("mediaId", "stringPropertyId", "intPropertyId", id) FROM stdin;
\.


--
-- TOC entry 1514 (class 0 OID 17294)
-- Dependencies: 1170
-- Data for Name: StringProperties; Type: TABLE DATA; Schema: public; Owner: yalp
--

COPY "StringProperties" (id, description, value) FROM stdin;
\.


--
-- TOC entry 1513 (class 0 OID 17269)
-- Dependencies: 1167
-- Data for Name: Users; Type: TABLE DATA; Schema: public; Owner: yalp
--

COPY "Users" ("level", id, name, "realName") FROM stdin;
\.


--
-- TOC entry 1509 (class 16386 OID 17329)
-- Dependencies: 1176 1176
-- Name: key_id_con; Type: CONSTRAINT; Schema: public; Owner: yalp; Tablespace: 
--

ALTER TABLE ONLY "PropertyConnector"
    ADD CONSTRAINT key_id_con PRIMARY KEY (id);


ALTER INDEX public.key_id_con OWNER TO yalp;

--
-- TOC entry 1499 (class 16386 OID 17291)
-- Dependencies: 1167 1167
-- Name: key_is_id; Type: CONSTRAINT; Schema: public; Owner: yalp; Tablespace: 
--

ALTER TABLE ONLY "Users"
    ADD CONSTRAINT key_is_id PRIMARY KEY (id);


ALTER INDEX public.key_is_id OWNER TO yalp;

--
-- TOC entry 1503 (class 16386 OID 17298)
-- Dependencies: 1170 1170
-- Name: prim_key_id; Type: CONSTRAINT; Schema: public; Owner: yalp; Tablespace: 
--

ALTER TABLE ONLY "StringProperties"
    ADD CONSTRAINT prim_key_id PRIMARY KEY (id);


ALTER INDEX public.prim_key_id OWNER TO yalp;

--
-- TOC entry 1505 (class 16386 OID 17310)
-- Dependencies: 1172 1172
-- Name: prim_key_int_id; Type: CONSTRAINT; Schema: public; Owner: yalp; Tablespace: 
--

ALTER TABLE ONLY "IntProperties"
    ADD CONSTRAINT prim_key_int_id PRIMARY KEY (id);


ALTER INDEX public.prim_key_int_id OWNER TO yalp;

--
-- TOC entry 1507 (class 16386 OID 17320)
-- Dependencies: 1174 1174
-- Name: prim_key_m_id; Type: CONSTRAINT; Schema: public; Owner: yalp; Tablespace: 
--

ALTER TABLE ONLY "Medias"
    ADD CONSTRAINT prim_key_m_id PRIMARY KEY (id);


ALTER INDEX public.prim_key_m_id OWNER TO yalp;

--
-- TOC entry 1501 (class 16386 OID 17405)
-- Dependencies: 1167 1167
-- Name: username_is_unique; Type: CONSTRAINT; Schema: public; Owner: yalp; Tablespace: 
--

ALTER TABLE ONLY "Users"
    ADD CONSTRAINT username_is_unique UNIQUE (name);


ALTER INDEX public.username_is_unique OWNER TO yalp;

--
-- TOC entry 1511 (class 16386 OID 17334)
-- Dependencies: 1176 1172 1504
-- Name: int_prop; Type: FK CONSTRAINT; Schema: public; Owner: yalp
--

ALTER TABLE ONLY "PropertyConnector"
    ADD CONSTRAINT int_prop FOREIGN KEY ("intPropertyId") REFERENCES "IntProperties"(id);


--
-- TOC entry 1510 (class 16386 OID 17330)
-- Dependencies: 1176 1174 1506
-- Name: media_prop; Type: FK CONSTRAINT; Schema: public; Owner: yalp
--

ALTER TABLE ONLY "PropertyConnector"
    ADD CONSTRAINT media_prop FOREIGN KEY ("mediaId") REFERENCES "Medias"(id);


--
-- TOC entry 1512 (class 16386 OID 17338)
-- Dependencies: 1176 1170 1502
-- Name: string_prop; Type: FK CONSTRAINT; Schema: public; Owner: yalp
--

ALTER TABLE ONLY "PropertyConnector"
    ADD CONSTRAINT string_prop FOREIGN KEY ("stringPropertyId") REFERENCES "StringProperties"(id);


--
-- TOC entry 1521 (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 yalp;
GRANT ALL ON SCHEMA public TO PUBLIC;


-- Completed on 2008-09-25 00:44:25 CEST

--
-- PostgreSQL database dump complete
--