2 -- Selected TOC Entries:
5 -- TOC Entry ID 2 (OID 19796)
7 -- Name: media_id_seq Type: SEQUENCE Owner: postgres
10 CREATE SEQUENCE "media_id_seq" start 1 increment 1 maxvalue 2147483647 minvalue 1 cache 1 ;
13 -- TOC Entry ID 3 (OID 19815)
15 -- Name: media_folder_id_seq Type: SEQUENCE Owner: postgres
18 CREATE SEQUENCE "media_folder_id_seq" start 1 increment 1 maxvalue 2147483647 minvalue 1 cache 1 ;
21 -- TOC Entry ID 4 (OID 19834)
23 -- Name: feature_id_seq Type: SEQUENCE Owner: postgres
26 CREATE SEQUENCE "feature_id_seq" start 1 increment 1 maxvalue 2147483647 minvalue 1 cache 1 ;
29 -- TOC Entry ID 5 (OID 19853)
31 -- Name: topic_id_seq Type: SEQUENCE Owner: postgres
34 CREATE SEQUENCE "topic_id_seq" start 1 increment 1 maxvalue 2147483647 minvalue 1 cache 1 ;
37 -- TOC Entry ID 6 (OID 19872)
39 -- Name: webdb_users_id_seq Type: SEQUENCE Owner: postgres
42 CREATE SEQUENCE "webdb_users_id_seq" start 1 increment 1 maxvalue 2147483647 minvalue 1 cache 1 ;
45 -- TOC Entry ID 7 (OID 19891)
47 -- Name: comment_id_seq Type: SEQUENCE Owner: postgres
50 CREATE SEQUENCE "comment_id_seq" start 1 increment 1 maxvalue 2147483647 minvalue 1 cache 1 ;
53 -- TOC Entry ID 8 (OID 19910)
55 -- Name: breaking_id_seq Type: SEQUENCE Owner: postgres
58 CREATE SEQUENCE "breaking_id_seq" start 1 increment 1 maxvalue 2147483647 minvalue 1 cache 1 ;
61 -- TOC Entry ID 9 (OID 19929)
63 -- Name: messages_id_seq Type: SEQUENCE Owner: postgres
66 CREATE SEQUENCE "messages_id_seq" start 1 increment 1 maxvalue 2147483647 minvalue 1 cache 1 ;
69 -- TOC Entry ID 10 (OID 19948)
71 -- Name: media_type_id_seq Type: SEQUENCE Owner: postgres
74 CREATE SEQUENCE "media_type_id_seq" start 1 increment 1 maxvalue 2147483647 minvalue 1 cache 1 ;
77 -- TOC Entry ID 12 (OID 19967)
79 -- Name: media_folder Type: TABLE Owner: postgres
82 CREATE TABLE "media_folder" (
83 "id" integer DEFAULT nextval('media_folder_id_seq'::text) NOT NULL,
84 "name" character varying(255) NOT NULL,
85 "date" character(8) NOT NULL,
86 "place" character varying(80),
89 "webdb_create" timestamp with time zone NOT NULL,
90 "webdb_lastchange" timestamp with time zone
94 -- TOC Entry ID 13 (OID 20000)
96 -- Name: media_type Type: TABLE Owner: postgres
99 CREATE TABLE "media_type" (
100 "id" integer DEFAULT nextval('media_type_id_seq'::text) NOT NULL,
101 "name" character varying(80) NOT NULL,
102 "mime_type" character varying(40) NOT NULL,
103 "classname" character varying(80) NOT NULL,
104 "tablename" character varying(80) NOT NULL,
105 "dcname" character varying(20)
109 -- TOC Entry ID 14 (OID 20016)
111 -- Name: img_format Type: TABLE Owner: postgres
114 CREATE TABLE "img_format" (
115 "id" smallint NOT NULL,
116 "name" character varying(20) NOT NULL,
117 "extension" character varying(10) NOT NULL,
118 "mimetype" character varying(40) NOT NULL,
119 "commment" character varying(255)
123 -- TOC Entry ID 15 (OID 20030)
125 -- Name: img_layout Type: TABLE Owner: postgres
128 CREATE TABLE "img_layout" (
129 "id" smallint NOT NULL,
130 "name" character varying(20) NOT NULL
134 -- TOC Entry ID 16 (OID 20041)
136 -- Name: img_type Type: TABLE Owner: postgres
139 CREATE TABLE "img_type" (
140 "id" smallint NOT NULL,
141 "name" character varying(30) NOT NULL
145 -- TOC Entry ID 17 (OID 20052)
147 -- Name: img_color Type: TABLE Owner: postgres
150 CREATE TABLE "img_color" (
151 "id" smallint NOT NULL,
152 "name" character varying(30) NOT NULL
158 CREATE SEQUENCE "language_id_seq" start 1 increment 1 maxvalue 2147483647 minvalue 1 cache 1 ;
\r
160 CREATE TABLE "language" (
161 "id" integer DEFAULT nextval('language_id_seq') NOT NULL,
162 "name" character varying(40) NOT NULL,
163 "code" character varying(2) NOT NULL,
164 Constraint "language_pkey" Primary Key ("id")
168 -- TOC Entry ID 19 (OID 20078)
170 -- Name: rights Type: TABLE Owner: postgres
173 CREATE TABLE "rights" (
174 "id" integer NOT NULL,
175 "name" character varying(80) NOT NULL,
177 Constraint "rights_pkey" Primary Key ("id")
181 -- TOC Entry ID 20 (OID 20108)
183 -- Name: feature Type: TABLE Owner: postgres
186 CREATE TABLE "feature" (
187 "id" integer DEFAULT nextval('feature_id_seq'::text) NOT NULL,
188 "title" character varying(80) NOT NULL,
190 "filename" character varying(20) NOT NULL,
191 "main_url" character varying(255),
192 "is_published" boolean DEFAULT '0' NOT NULL,
193 Constraint "feature_pkey" Primary Key ("id")
197 -- TOC Entry ID 21 (OID 20143)
199 -- Name: webdb_users Type: TABLE Owner: postgres
202 CREATE TABLE "webdb_users" (
203 "id" integer DEFAULT nextval('webdb_users_id_seq'::text) NOT NULL,
204 "login" character varying(16) NOT NULL,
205 "password" character varying(16) NOT NULL,
206 "is_admin" boolean DEFAULT '0' NOT NULL,
207 Constraint "webdb_users_pkey" Primary Key ("id")
211 -- TOC Entry ID 22 (OID 20161)
213 -- Name: content_x_topic Type: TABLE Owner: postgres
216 CREATE TABLE "content_x_topic" (
217 "content_id" integer NOT NULL,
218 "topic_id" integer NOT NULL
223 CREATE SEQUENCE "article_type_id_seq" start 1 increment 1 maxvalue 2147483647 minvalue 1 cache 1 ;
\r
225 CREATE TABLE "article_type" (
226 "id" integer DEFAULT nextval('article_type_id_seq') NOT NULL,
227 "name" character varying(40) NOT NULL,
228 CONSTRAINT "article_type_pkey" PRIMARY KEY ("id")
232 -- TOC Entry ID 24 (OID 20183)
234 -- Name: topic Type: TABLE Owner: postgres
237 CREATE TABLE "topic" (
238 "id" integer DEFAULT nextval('topic_id_seq'::text) NOT NULL,
239 "parent_id" integer DEFAULT '0' NOT NULL,
240 "title" character varying(80) NOT NULL,
242 "filename" character varying(20) NOT NULL,
243 "main_url" character varying(255),
244 "archiv_url" character varying(255),
245 Constraint "topic_pkey" Primary Key ("id")
249 -- TOC Entry ID 25 (OID 20219)
251 -- Name: comment Type: TABLE Owner: postgres
254 CREATE TABLE "comment" (
255 "id" integer DEFAULT nextval('comment_id_seq'::text) NOT NULL,
256 "title" character varying(80) NOT NULL,
257 "creator" character varying(80) NOT NULL,
258 "description" text NOT NULL,
259 "main_url" character varying(255),
260 "email" character varying(80),
261 "address" character varying(80),
262 "phone" character varying(20),
263 "webdb_create" timestamp with time zone NOT NULL,
264 "is_published" boolean DEFAULT '1' NOT NULL,
265 "to_language" integer DEFAULT '0' NOT NULL,
266 "to_media" integer NOT NULL,
267 "to_comment_status" smallint,
269 "is_html" boolean DEFAULT '0' NOT NULL,
270 Constraint "comment_pkey" Primary Key ("id")
274 -- TOC Entry ID 26 (OID 20266)
276 -- Name: media Type: TABLE Owner: postgres
279 CREATE TABLE "media" (
280 "id" integer DEFAULT nextval('media_id_seq'::text) NOT NULL,
281 "title" character varying(80) NOT NULL,
282 "subtitle" character varying(30),
283 "edittitle" character varying(30),
284 "date" character(8) NOT NULL,
285 "creator" character varying(80),
286 "creator_main_url" character varying(255),
287 "creator_email" character varying(80),
288 "creator_address" character varying(80),
289 "creator_phone" character varying(20),
293 "source" character varying(255),
294 "publish_date" timestamp with time zone,
295 "publish_server" character varying(255),
296 "publish_path" character varying(255),
297 "is_published" boolean DEFAULT '0' NOT NULL,
298 "is_produced" boolean DEFAULT '0' NOT NULL,
299 "to_feature" integer DEFAULT '0' NOT NULL,
300 "to_media_folder" integer DEFAULT '0' NOT NULL,
301 "to_media_type" smallint DEFAULT '0' NOT NULL,
302 "to_publisher" integer NOT NULL,
303 "to_language" integer DEFAULT '0',
304 "to_rights" integer DEFAULT '0',
305 "webdb_create" timestamp with time zone NOT NULL,
306 "webdb_lastchange" timestamp with time zone,
311 -- TOC Entry ID 27 (OID 20326)
313 -- Name: uploaded_media Type: TABLE Owner: postgres
316 CREATE TABLE "uploaded_media" (
317 "icon_is_produced" boolean DEFAULT '0' NOT NULL,
318 "icon_path" character varying(255),
324 -- TOC Entry ID 28 (OID 20392)
326 -- Name: images Type: TABLE Owner: postgres
329 CREATE TABLE "images" (
332 "year" character varying(40),
333 "img_width" smallint,
334 "img_height" smallint,
335 "to_img_format" smallint DEFAULT '0' NOT NULL,
336 "to_img_layout" smallint DEFAULT '0' NOT NULL,
337 "to_img_type" smallint DEFAULT '0' NOT NULL,
338 "to_img_color" smallint DEFAULT '0' NOT NULL,
339 "icon_width" smallint,
340 "icon_height" smallint
342 INHERITS ("uploaded_media");
345 -- TOC Entry ID 29 (OID 20474)
347 -- Name: content Type: TABLE Owner: postgres
350 CREATE TABLE "content" (
352 "link_url" character varying(255),
353 "is_html" boolean DEFAULT '0' NOT NULL,
354 "is_stored" boolean DEFAULT '0' NOT NULL,
355 "to_article_type" smallint DEFAULT '0' NOT NULL,
356 "to_content" integer,
362 -- TOC Entry ID 30 (OID 20549)
364 -- Name: breaking Type: TABLE Owner: postgres
367 CREATE TABLE "breaking" (
368 "id" integer DEFAULT nextval('breaking_id_seq'::text) NOT NULL,
369 "text" character varying(255) NOT NULL,
370 "webdb_create" timestamp with time zone NOT NULL
374 -- TOC Entry ID 31 (OID 20562)
376 -- Name: messages Type: TABLE Owner: postgres
379 CREATE TABLE "messages" (
380 "id" integer DEFAULT nextval('messages_id_seq'::text) NOT NULL,
381 "title" character varying(30),
382 "description" character varying(255) NOT NULL,
383 "creator" character varying(30) NOT NULL,
384 "webdb_create" timestamp with time zone NOT NULL
390 CREATE SEQUENCE "comment_status_id_seq" start 1 increment 1 maxvalue 2147483647 minvalue 1 cache 1 ;
\r
392 CREATE TABLE "comment_status" (
393 "id" integer DEFAULT nextval('comment_status_id_seq') NOT NULL,
394 "name" character varying(40) NOT NULL,
395 CONSTRAINT "comment_status_pkey" PRIMARY KEY ("id")
400 -- TOC Entry ID 33 (OID 20588)
402 -- Name: content_x_media Type: TABLE Owner: postgres
405 CREATE TABLE "content_x_media" (
406 "content_id" integer,
411 -- TOC Entry ID 11 (OID 20599)
413 -- Name: links_imcs_id_seq Type: SEQUENCE Owner: postgres
416 CREATE SEQUENCE "links_imcs_id_seq" start 1 increment 1 maxvalue 2147483647 minvalue 1 cache 1 ;
419 -- TOC Entry ID 34 (OID 20618)
421 -- Name: links_imcs Type: TABLE Owner: postgres
424 CREATE TABLE "links_imcs" (
425 "id" integer DEFAULT nextval('links_imcs_id_seq'::text) NOT NULL,
426 "to_parent_id" integer,
427 "title" character varying(80) NOT NULL,
428 "url" character varying(255) NOT NULL,
429 "sortpriority" integer DEFAULT '1',
430 "to_language" integer DEFAULT '0' NOT NULL,
431 Constraint "links_imcs_pkey" Primary Key ("id")
435 -- TOC Entry ID 35 (OID 37215)
437 -- Name: audio Type: TABLE Owner: postgres
440 CREATE TABLE "audio" (
443 INHERITS ("uploaded_media");
446 -- TOC Entry ID 36 (OID 37284)
448 -- Name: video Type: TABLE Owner: postgres
451 CREATE TABLE "video" (
453 INHERITS ("uploaded_media");
456 -- TOC Entry ID 37 (OID 45396)
458 -- Name: other_media Type: TABLE Owner: postgres
461 CREATE TABLE "other_media" (
464 INHERITS ("uploaded_media");
467 -- TOC Entry ID 40 (OID 20143)
469 -- Name: "idx_webdb_user_log_pas_is_admin" Type: INDEX Owner: postgres
472 CREATE INDEX "idx_webdb_user_log_pas_is_admin" on "webdb_users" using btree ( "login" "varchar_ops", "password" "varchar_ops", "is_admin" "bool_ops" );
475 -- TOC Entry ID 41 (OID 20143)
477 -- Name: "idx_webdb_user_log_pas" Type: INDEX Owner: postgres
480 CREATE INDEX "idx_webdb_user_log_pas" on "webdb_users" using btree ( "login" "varchar_ops", "password" "varchar_ops" );
483 -- TOC Entry ID 42 (OID 20161)
485 -- Name: "idx_content" Type: INDEX Owner: postgres
488 CREATE UNIQUE INDEX "idx_content" on "content_x_topic" using btree ( "content_id" "int4_ops", "topic_id" "int4_ops" );
491 -- TOC Entry ID 43 (OID 20161)
493 -- Name: "idx_topic" Type: INDEX Owner: postgres
496 CREATE UNIQUE INDEX "idx_topic" on "content_x_topic" using btree ( "topic_id" "int4_ops", "content_id" "int4_ops" );
499 -- TOC Entry ID 44 (OID 20183)
501 -- Name: "idx_topic_title" Type: INDEX Owner: postgres
504 CREATE INDEX "idx_topic_title" on "topic" using btree ( "title" "varchar_ops" );
507 -- TOC Entry ID 45 (OID 20183)
509 -- Name: "idx_topic_id" Type: INDEX Owner: postgres
512 CREATE UNIQUE INDEX "idx_topic_id" on "topic" using btree ( "id" "int4_ops" );
515 -- TOC Entry ID 38 (OID 20219)
517 -- Name: "comment_checksum_index" Type: INDEX Owner: postgres
520 CREATE INDEX "comment_checksum_index" on "comment" using btree ( "checksum" "int4_ops" );
523 -- TOC Entry ID 46 (OID 20219)
525 -- Name: "idx_comment_to_media" Type: INDEX Owner: postgres
528 CREATE INDEX "idx_comment_to_media" on "comment" using btree ( "to_media" "int4_ops" );
531 create index idx_comment_webdb_create on comment(webdb_create);
538 -- TOC Entry ID 59 (OID 20326)
540 -- Name: "idx_uploaded_media_id" Type: INDEX Owner: postgres
543 CREATE UNIQUE INDEX "idx_uploaded_media_id" on "uploaded_media" using btree ( "id" "int4_ops" );
546 -- TOC Entry ID 60 (OID 20326)
548 -- Name: "idx_uploaded_media_is_published" Type: INDEX Owner: postgres
551 CREATE UNIQUE INDEX "idx_uploaded_media_is_published" on "uploaded_media" using btree ( "id" "int4_ops", "is_published" "bool_ops" );
554 -- TOC Entry ID 47 (OID 20392)
556 -- Name: "idx_images_is_published__icon_i" Type: INDEX Owner: postgres
559 CREATE INDEX "idx_images_is_published__icon_i" on "images" using btree ( "is_published" "bool_ops", "icon_is_produced" "bool_ops" );
562 -- TOC Entry ID 48 (OID 20392)
564 -- Name: "idx_images_id" Type: INDEX Owner: postgres
567 CREATE UNIQUE INDEX "idx_images_id" on "images" using btree ( "id" "int4_ops" );
570 -- TOC Entry ID 39 (OID 20474)
572 -- Name: "content_checksum_index" Type: INDEX Owner: postgres
575 CREATE INDEX "content_checksum_index" on "content" using btree ( "checksum" "int4_ops" );
578 -- TOC Entry ID 49 (OID 20474)
580 -- Name: "idx_content_to_article_type" Type: INDEX Owner: postgres
583 CREATE INDEX "idx_content_to_article_type" on "content" using btree ( "to_article_type" "int2_ops" );
586 -- TOC Entry ID 50 (OID 20474)
588 -- Name: "idx_content_is_produced" Type: INDEX Owner: postgres
591 CREATE INDEX "idx_content_is_produced" on "content" using btree ( "is_produced" "bool_ops" );
594 -- TOC Entry ID 51 (OID 20474)
596 -- Name: "idx_content_is_published__to_ar" Type: INDEX Owner: postgres
599 CREATE INDEX "idx_content_is_published__to_ar" on "content" using btree ( "is_published" "bool_ops", "to_article_type" "int2_ops" );
602 -- TOC Entry ID 52 (OID 20474)
604 -- Name: "idx_content_is_stored" Type: INDEX Owner: postgres
607 CREATE INDEX "idx_content_is_stored" on "content" using btree ( "is_stored" "bool_ops" );
610 -- TOC Entry ID 53 (OID 20474)
612 -- Name: "idx_content_is_published__id" Type: INDEX Owner: postgres
615 CREATE INDEX "idx_content_is_published__id" on "content" using btree ( "is_published" "bool_ops", "id" "int4_ops" );
618 -- TOC Entry ID 54 (OID 20474)
620 -- Name: "idx_content_is_pub__to_art__to_" Type: INDEX Owner: postgres
623 CREATE INDEX "idx_content_is_pub__to_art__to_" on "content" using btree ( "is_published" "bool_ops", "to_article_type" "int2_ops", "id" "int4_ops" );
626 -- TOC Entry ID 55 (OID 20474)
628 -- Name: "idx_content_id" Type: INDEX Owner: postgres
631 CREATE UNIQUE INDEX "idx_content_id" on "content" using btree ( "id" "int4_ops" );
634 -- TOC Entry ID 56 (OID 20588)
636 -- Name: "idx_content_media" Type: INDEX Owner: postgres
639 CREATE UNIQUE INDEX "idx_content_media" on "content_x_media" using btree ( "content_id" "int4_ops", "media_id" "int4_ops" );
642 -- TOC Entry ID 57 (OID 20588)
644 -- Name: "idx_media_content" Type: INDEX Owner: postgres
647 CREATE UNIQUE INDEX "idx_media_content" on "content_x_media" using btree ( "media_id" "int4_ops", "content_id" "int4_ops" );
650 -- TOC Entry ID 62 (OID 37215)
652 -- Name: "idx_audio_is_published_produced" Type: INDEX Owner: postgres
655 CREATE INDEX "idx_audio_is_published_produced" on "audio" using btree ( "is_published" "bool_ops", "is_produced" "bool_ops" );
658 -- TOC Entry ID 64 (OID 37215)
660 -- Name: "idx_audio_id" Type: INDEX Owner: postgres
663 CREATE UNIQUE INDEX "idx_audio_id" on "audio" using btree ( "id" "int4_ops" );
666 -- TOC Entry ID 65 (OID 37215)
668 -- Name: "idx_video_id" Type: INDEX Owner: postgres
671 CREATE UNIQUE INDEX "idx_video_id" on "audio" using btree ( "id" "int4_ops" );
674 -- TOC Entry ID 63 (OID 37284)
676 -- Name: "idx_video_is_published_produced" Type: INDEX Owner: postgres
679 CREATE INDEX "idx_video_is_published_produced" on "video" using btree ( "is_published" "bool_ops", "is_produced" "bool_ops" );
683 -- TOC Entry ID 37 (OID 520246)
685 -- Name: "idx_content_is_published" Type: INDEX Owner: postgres
688 CREATE INDEX "idx_content_is_published" on "content" using btree ( "is_published" "bool_ops" );
691 -- TOC Entry ID 47 (OID 465036)
693 -- Name: "idx_comment_tomedia_ispublished" Type: INDEX Owner: postgres
696 CREATE INDEX "idx_comment_tomedia_ispublished" on "comment" using btree ( "to_media" "int4_ops", "is_published" "bool_ops" );
698 CREATE UNIQUE INDEX "idx_comment_id" on "comment" using btree ( "id" "int4_ops" );