5 CREATE SEQUENCE "media_folder_id_seq" start 1 increment 1 maxvalue 2147483647 minvalue 1 cache 1 ;
7 CREATE TABLE "media_folder" (
8 "id" integer DEFAULT nextval('media_folder_id_seq'::text) NOT NULL,
9 "name" character varying(255) NOT NULL,
10 "date" character(8) NOT NULL,
11 "place" character varying(80),
14 "webdb_create" timestamp with time zone NOT NULL,
15 "webdb_lastchange" timestamp with time zone
22 CREATE SEQUENCE "media_type_id_seq" start 1 increment 1 maxvalue 2147483647 minvalue 1 cache 1 ;
24 CREATE TABLE "media_type" (
25 "id" integer DEFAULT nextval('media_type_id_seq'::text) NOT NULL,
26 "name" character varying(80) NOT NULL,
27 "mime_type" character varying(40) NOT NULL,
28 "classname" character varying(80) NOT NULL,
29 "tablename" character varying(80) NOT NULL,
30 "dcname" character varying(20)
37 CREATE SEQUENCE "language_id_seq" start 1 increment 1 maxvalue 2147483647 minvalue 1 cache 1 ;
39 CREATE TABLE "language" (
40 "id" integer DEFAULT nextval('language_id_seq') NOT NULL,
41 "name" character varying(40) NOT NULL,
42 "code" character varying(2) NOT NULL,
43 Constraint "language_pkey" Primary Key ("id")
50 CREATE SEQUENCE "comment_status_id_seq" start 1 increment 1 maxvalue 2147483647 minvalue 1 cache 1 ;
52 CREATE TABLE "comment_status" (
53 "id" integer DEFAULT nextval('comment_status_id_seq') NOT NULL,
54 "name" character varying(40) NOT NULL,
55 CONSTRAINT "comment_status_pkey" PRIMARY KEY ("id")
64 CREATE TABLE "rights" (
65 "id" integer NOT NULL,
66 "name" character varying(80) NOT NULL,
68 Constraint "rights_pkey" Primary Key ("id")
75 CREATE SEQUENCE "webdb_users_id_seq" start 1 increment 1 maxvalue 2147483647 minvalue 1 cache 1 ;
77 CREATE TABLE "webdb_users" (
78 "id" integer DEFAULT nextval('webdb_users_id_seq'::text) NOT NULL,
79 "login" character varying(16) UNIQUE NOT NULL,
80 "password" character varying(255) NOT NULL,
81 "is_admin" boolean DEFAULT '0' NOT NULL,
83 "is_disabled" boolean DEFAULT '0' NOT NULL,
84 "email" character varying(255) DEFAULT '' NOT NULL,
86 "webdb_create" timestamp with time zone NOT NULL,
87 "lastlogin" timestamp with time zone,
88 CONSTRAINT "webdb_users_pkey" Primary Key ("id")
96 CREATE SEQUENCE "article_type_id_seq" start 1 increment 1 maxvalue 2147483647 minvalue 1 cache 1 ;
98 CREATE TABLE "article_type" (
99 "id" integer DEFAULT nextval('article_type_id_seq') NOT NULL,
100 "name" character varying(40) NOT NULL,
101 CONSTRAINT "article_type_pkey" PRIMARY KEY ("id")
108 CREATE SEQUENCE "topic_id_seq" start 1 increment 1 maxvalue 2147483647 minvalue 1 cache 1 ;
110 CREATE TABLE "topic" (
111 "id" integer DEFAULT nextval('topic_id_seq'::text) NOT NULL,
112 "parent_id" integer DEFAULT '0' NOT NULL,
113 "title" character varying(80) NOT NULL,
115 "filename" character varying(20) NOT NULL,
116 "main_url" character varying(255),
117 "archiv_url" character varying(255),
118 Constraint "topic_pkey" Primary Key ("id")
121 CREATE INDEX "idx_topic_title" on "topic" using btree ( "title" "varchar_ops" );
128 CREATE TABLE "content_x_topic" (
129 "content_id" integer NOT NULL,
130 "topic_id" integer NOT NULL
133 CREATE UNIQUE INDEX "idx_content" on "content_x_topic" using btree ( "content_id" "int4_ops", "topic_id" "int4_ops" );
134 CREATE UNIQUE INDEX "idx_topic" on "content_x_topic" using btree ( "topic_id" "int4_ops", "content_id" "int4_ops" );
140 CREATE SEQUENCE "comment_id_seq" start 1 increment 1 maxvalue 2147483647 minvalue 1 cache 1 ;
141 CREATE TABLE "comment" (
142 "id" integer DEFAULT nextval('comment_id_seq'::text) NOT NULL,
143 "title" character varying(80) NOT NULL,
144 "creator" character varying(80) NOT NULL,
145 "description" text NOT NULL,
146 "main_url" character varying(255),
147 "email" character varying(80),
148 "address" character varying(80),
149 "phone" character varying(20),
150 "webdb_create" timestamp with time zone NOT NULL,
151 "webdb_lastchange" timestamp with time zone,
152 "is_published" boolean DEFAULT '1' NOT NULL,
153 "to_language" integer DEFAULT '0' NOT NULL,
154 "to_media" integer NOT NULL,
155 "to_comment_status" smallint,
157 "is_html" boolean DEFAULT '0' NOT NULL,
158 Constraint "comment_pkey" Primary Key ("id")
161 CREATE INDEX "idx_comment_to_media" on "comment" using btree ( "to_media" "int4_ops" );
162 CREATE INDEX idx_comment_webdb_create on comment(webdb_create);
163 CREATE INDEX "idx_comment_tomedia_ispublished" on "comment" using btree ( "to_media" "int4_ops", "is_published" "bool_ops" );
167 CREATE TABLE "comment_x_media" (
168 "comment_id" integer,
172 CREATE UNIQUE INDEX idx_comment_media on comment_x_media (comment_id, media_id);
173 CREATE UNIQUE INDEX idx_media_comment on comment_x_media (media_id, comment_id);
180 CREATE SEQUENCE "media_id_seq" start 1 increment 1 maxvalue 2147483647 minvalue 1 cache 1 ;
186 CREATE TABLE "uploaded_media" (
187 "id" integer DEFAULT nextval('media_id_seq'::text) NOT NULL,
188 "title" character varying(255),
189 "subtitle" character varying(255),
190 "edittitle" character varying(255),
191 "date" character(8) NOT NULL,
192 "creator" character varying(80),
193 "creator_main_url" character varying(255),
194 "creator_email" character varying(80),
195 "creator_address" character varying(80),
196 "creator_phone" character varying(20),
199 "source" character varying(255),
200 "publish_server" character varying(255),
201 "publish_path" character varying(255),
202 "is_published" boolean DEFAULT '0' NOT NULL,
203 "is_produced" boolean DEFAULT '0' NOT NULL,
204 "to_media_folder" integer DEFAULT '0' NOT NULL,
205 "to_media_type" smallint DEFAULT '0' NOT NULL,
206 "to_publisher" integer NOT NULL,
207 "to_language" integer DEFAULT '0',
208 "to_rights" integer DEFAULT '0',
209 "webdb_create" timestamp with time zone NOT NULL,
210 "webdb_lastchange" timestamp with time zone,
211 "icon_is_produced" boolean DEFAULT '0' NOT NULL,
212 "icon_path" character varying(255),
214 Constraint "uploaded_media_pkey" Primary Key ("id")
217 CREATE UNIQUE INDEX "idx_uploaded_media_id" on "uploaded_media" using btree ( "id" "int4_ops" );
218 CREATE UNIQUE INDEX "idx_uploaded_media_is_published" on "uploaded_media" using btree ( "id" "int4_ops", "is_published" "bool_ops" );
224 CREATE TABLE "images" (
227 "year" character varying(40),
228 "img_width" smallint,
229 "img_height" smallint,
230 "to_img_format" smallint DEFAULT '0' NOT NULL,
231 "to_img_layout" smallint DEFAULT '0' NOT NULL,
232 "to_img_type" smallint DEFAULT '0' NOT NULL,
233 "to_img_color" smallint DEFAULT '0' NOT NULL,
234 "icon_width" smallint,
235 "icon_height" smallint
237 INHERITS ("uploaded_media");
239 CREATE INDEX "idx_images_is_published" on "images" using btree ( "is_published" "bool_ops", "icon_is_produced" "bool_ops" );
240 CREATE UNIQUE INDEX "idx_images_id" on "images" using btree ( "id" "int4_ops" );
246 CREATE TABLE "img_format" (
247 "id" smallint NOT NULL,
248 "name" character varying(20) NOT NULL,
249 "extension" character varying(10) NOT NULL,
250 "mimetype" character varying(40) NOT NULL,
251 "commment" character varying(255)
258 CREATE TABLE "img_layout" (
259 "id" smallint NOT NULL,
260 "name" character varying(20) NOT NULL
267 CREATE TABLE "img_type" (
268 "id" smallint NOT NULL,
269 "name" character varying(30) NOT NULL
276 CREATE TABLE "img_color" (
277 "id" smallint NOT NULL,
278 "name" character varying(30) NOT NULL
286 CREATE TABLE "audio" (
289 INHERITS ("uploaded_media");
291 CREATE INDEX "idx_audio_is_published_produced" on "audio" using btree ( "is_published" "bool_ops", "is_produced" "bool_ops" );
292 CREATE UNIQUE INDEX "idx_audio_id" on "audio" using btree ( "id" "int4_ops" );
298 CREATE TABLE "video" (
300 INHERITS ("uploaded_media");
302 CREATE INDEX "idx_video_is_published_produced" on "video" using btree ( "is_published" "bool_ops", "is_produced" "bool_ops" );
303 CREATE UNIQUE INDEX "idx_video_id" on "video" using btree ( "id" "int4_ops" );
309 CREATE TABLE "other_media" (
311 INHERITS ("uploaded_media");
313 CREATE INDEX "idx_othermedia_is_published_produced" on "other_media" using btree ( "is_published" "bool_ops", "is_produced" "bool_ops" );
314 CREATE UNIQUE INDEX "idx_othermedia_id" on "other_media" using btree ( "id" "int4_ops" );
320 CREATE TABLE "content" (
321 "id" integer DEFAULT nextval('media_id_seq'::text) NOT NULL,
322 "title" character varying(255),
323 "subtitle" character varying(255),
324 "edittitle" character varying(255),
325 "date" character(8) NOT NULL,
326 "creator" character varying(80),
327 "creator_main_url" character varying(255),
328 "creator_email" character varying(80),
329 "creator_address" character varying(80),
330 "creator_phone" character varying(80),
333 "source" character varying(255),
334 "is_published" boolean DEFAULT '0' NOT NULL,
335 "is_produced" boolean DEFAULT '0' NOT NULL,
336 "to_publisher" integer NOT NULL,
337 "to_language" integer DEFAULT '0',
338 "to_rights" integer DEFAULT '0',
339 "webdb_create" timestamp with time zone NOT NULL,
340 "webdb_lastchange" timestamp with time zone,
342 "is_html" boolean DEFAULT '0' NOT NULL,
343 "to_article_type" smallint DEFAULT '0' NOT NULL,
344 "to_content" integer,
346 "to_locking_user" integer,
347 Constraint "content_pkey" Primary Key ("id")
351 CREATE INDEX "idx_content_to_article_type" on "content" using btree ( "to_article_type" "int2_ops" );
352 CREATE INDEX "idx_content_is_produced" on "content" using btree ( "is_produced" "bool_ops" );
353 CREATE INDEX "idx_content_is_published__to_ar" on "content" using btree ( "is_published" "bool_ops", "to_article_type" "int2_ops" );
354 CREATE INDEX "idx_content_is_published__id" on "content" using btree ( "is_published" "bool_ops", "id" "int4_ops" );
355 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" );
356 CREATE INDEX "idx_content_is_published" on "content" using btree ( "is_published" "bool_ops" );
357 CREATE INDEX idx_content_webdb_create on content(webdb_create);
362 CREATE TABLE "content_x_media" (
363 "content_id" integer,
367 CREATE INDEX "idx_cxm_content" on "content_x_media" using btree ( "content_id" "int4_ops" );
368 CREATE INDEX "idx_cxm_media" on "content_x_media" using btree ( "media_id" "int4_ops" );
374 CREATE SEQUENCE "breaking_id_seq" start 1 increment 1 maxvalue 2147483647 minvalue 1 cache 1 ;
376 CREATE TABLE "breaking" (
377 "id" integer DEFAULT nextval('breaking_id_seq'::text) NOT NULL,
378 "text" character varying(255) NOT NULL,
379 "webdb_create" timestamp with time zone NOT NULL
386 CREATE SEQUENCE "messages_id_seq" start 1 increment 1 maxvalue 2147483647 minvalue 1 cache 1 ;
388 CREATE TABLE "messages" (
389 "id" integer DEFAULT nextval('messages_id_seq'::text) NOT NULL,
390 "title" character varying(30),
391 "description" character varying(255) NOT NULL,
392 "creator" character varying(30) NOT NULL,
393 "webdb_create" timestamp with time zone NOT NULL
401 CREATE SEQUENCE "filter_id_seq" start 1 increment 1 maxvalue 2147483647 minvalue 1 cache 1 ;
403 CREATE TABLE "filter" (
404 "id" integer DEFAULT nextval('filter_id_seq'::text) NOT NULL,
406 "filter_group_id" integer,
407 "type" character varying(255) NOT NULL,
408 "expression" character varying(255) NOT NULL,
409 "tag" character varying(255) NOT NULL,
411 "articleaction" character varying(255) NOT NULL,
412 "commentaction" character varying(255) NOT NULL,
413 "last_hit" timestamp with time zone
420 CREATE SEQUENCE "filter_group_id_seq" start 1 increment 1 maxvalue 2147483647 minvalue 1 cache 1 ;
422 CREATE TABLE "filter_group" (
423 "id" integer DEFAULT nextval('filter_group_id_seq'::text) NOT NULL,
424 "name" character varying(255),