X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=dbscripts%2Fcreate_pg.sql;h=4070d4612c8749b1a074e0ab88d65d0852c3c550;hb=04b4ac65a0b00082225ba81e116202246aec55b3;hp=57a7ff4b73f4d7092a8cd34741ae9dd236e8f60c;hpb=c3a2c201d92140363c4ec1f59c6457704330270d;p=mir.git diff --git a/dbscripts/create_pg.sql b/dbscripts/create_pg.sql index 57a7ff4b..4070d461 100755 --- a/dbscripts/create_pg.sql +++ b/dbscripts/create_pg.sql @@ -1,93 +1,9 @@ -- --- Selected TOC Entries: --- -\connect - postgres --- --- TOC Entry ID 2 (OID 28714) --- --- Name: media_id_seq Type: SEQUENCE Owner: postgres --- - -CREATE SEQUENCE "media_id_seq" start 1 increment 1 maxvalue 2147483647 minvalue 1 cache 1 ; - --- --- TOC Entry ID 3 (OID 28733) --- --- Name: media_folder_id_seq Type: SEQUENCE Owner: postgres +-- media_folder -- CREATE SEQUENCE "media_folder_id_seq" start 1 increment 1 maxvalue 2147483647 minvalue 1 cache 1 ; --- --- TOC Entry ID 4 (OID 28752) --- --- Name: creator_id_seq Type: SEQUENCE Owner: postgres --- - -CREATE SEQUENCE "creator_id_seq" start 1 increment 1 maxvalue 2147483647 minvalue 1 cache 1 ; - --- --- TOC Entry ID 5 (OID 28771) --- --- Name: feature_id_seq Type: SEQUENCE Owner: postgres --- - -CREATE SEQUENCE "feature_id_seq" start 1 increment 1 maxvalue 2147483647 minvalue 1 cache 1 ; - --- --- TOC Entry ID 6 (OID 28790) --- --- Name: topic_id_seq Type: SEQUENCE Owner: postgres --- - -CREATE SEQUENCE "topic_id_seq" start 1 increment 1 maxvalue 2147483647 minvalue 1 cache 1 ; - --- --- TOC Entry ID 7 (OID 28809) --- --- Name: webdb_users_id_seq Type: SEQUENCE Owner: postgres --- - -CREATE SEQUENCE "webdb_users_id_seq" start 1 increment 1 maxvalue 2147483647 minvalue 1 cache 1 ; - --- --- TOC Entry ID 8 (OID 28828) --- --- Name: comment_id_seq Type: SEQUENCE Owner: postgres --- - -CREATE SEQUENCE "comment_id_seq" start 1 increment 1 maxvalue 2147483647 minvalue 1 cache 1 ; - --- --- TOC Entry ID 9 (OID 28847) --- --- Name: breaking_id_seq Type: SEQUENCE Owner: postgres --- - -CREATE SEQUENCE "breaking_id_seq" start 1 increment 1 maxvalue 2147483647 minvalue 1 cache 1 ; - --- --- TOC Entry ID 10 (OID 28866) --- --- Name: messages_id_seq Type: SEQUENCE Owner: postgres --- - -CREATE SEQUENCE "messages_id_seq" start 1 increment 1 maxvalue 2147483647 minvalue 1 cache 1 ; - --- --- TOC Entry ID 10 (OID 28866) --- --- Name: media_type_id_seq Type: SEQUENCE Owner: postgres --- - -CREATE SEQUENCE "media_type_id_seq" start 1 increment 1 maxvalue 2147483647 minvalue 1 cache 1 ; - --- --- TOC Entry ID 12 (OID 28885) --- --- Name: media_folder Type: TABLE Owner: postgres --- - CREATE TABLE "media_folder" ( "id" integer DEFAULT nextval('media_folder_id_seq'::text) NOT NULL, "name" character varying(255) NOT NULL, @@ -100,13 +16,13 @@ CREATE TABLE "media_folder" ( ); -- --- TOC Entry ID 13 (OID 28918) --- --- Name: media_type Type: TABLE Owner: postgres +-- media_type -- +CREATE SEQUENCE "media_type_id_seq" start 1 increment 1 maxvalue 2147483647 minvalue 1 cache 1 ; + CREATE TABLE "media_type" ( - "id" integer DEFAULT nextval('media_type_id_seq'::text) NOT NULL, + "id" integer DEFAULT nextval('media_type_id_seq'::text) NOT NULL, "name" character varying(80) NOT NULL, "mime_type" character varying(40) NOT NULL, "classname" character varying(80) NOT NULL, @@ -115,69 +31,34 @@ CREATE TABLE "media_type" ( ); -- --- TOC Entry ID 14 (OID 28932) --- --- Name: img_format Type: TABLE Owner: postgres +-- language -- -CREATE TABLE "img_format" ( - "id" smallint NOT NULL, - "name" character varying(20) NOT NULL, - "extension" character varying(10) NOT NULL, - "mimetype" character varying(40) NOT NULL, - "commment" character varying(255) -); - --- --- TOC Entry ID 15 (OID 28946) --- --- Name: img_layout Type: TABLE Owner: postgres --- +CREATE SEQUENCE "language_id_seq" start 1 increment 1 maxvalue 2147483647 minvalue 1 cache 1 ; -CREATE TABLE "img_layout" ( - "id" smallint NOT NULL, - "name" character varying(20) NOT NULL +CREATE TABLE "language" ( + "id" integer DEFAULT nextval('language_id_seq') NOT NULL, + "name" character varying(40) NOT NULL, + "code" character varying(2) NOT NULL, + Constraint "language_pkey" Primary Key ("id") ); -- --- TOC Entry ID 16 (OID 28957) --- --- Name: img_type Type: TABLE Owner: postgres +-- comment_status -- -CREATE TABLE "img_type" ( - "id" smallint NOT NULL, - "name" character varying(30) NOT NULL -); +CREATE SEQUENCE "comment_status_id_seq" start 1 increment 1 maxvalue 2147483647 minvalue 1 cache 1 ; --- --- TOC Entry ID 17 (OID 28968) --- --- Name: img_color Type: TABLE Owner: postgres --- - -CREATE TABLE "img_color" ( - "id" smallint NOT NULL, - "name" character varying(30) NOT NULL +CREATE TABLE "comment_status" ( + "id" integer DEFAULT nextval('comment_status_id_seq') NOT NULL, + "name" character varying(40) NOT NULL, + CONSTRAINT "comment_status_pkey" PRIMARY KEY ("id") ); --- --- TOC Entry ID 18 (OID 28979) --- --- Name: language Type: TABLE Owner: postgres --- -CREATE TABLE "language" ( - "id" integer NOT NULL, - "name" character varying(40) NOT NULL, - "code" character varying(2) NOT NULL, - Constraint "language_pkey" Primary Key ("id") -); -- --- TOC Entry ID 19 (OID 28994) --- --- Name: rights Type: TABLE Owner: postgres +-- rights -- CREATE TABLE "rights" ( @@ -188,79 +69,44 @@ CREATE TABLE "rights" ( ); -- --- TOC Entry ID 20 (OID 29024) --- --- Name: creator Type: TABLE Owner: postgres +-- webdb_users -- -CREATE TABLE "creator" ( - "id" integer DEFAULT nextval('creator_id_seq'::text) NOT NULL, - "name" character varying(80) NOT NULL, - "main_url" character varying(255), - "email" character varying(80), - "address" character varying(80), - "phone" character varying(20), - Constraint "creator_pkey" Primary Key ("id") -); - --- --- TOC Entry ID 21 (OID 29043) --- --- Name: feature Type: TABLE Owner: postgres --- - -CREATE TABLE "feature" ( - "id" integer DEFAULT nextval('feature_id_seq'::text) NOT NULL, - "title" character varying(80) NOT NULL, - "description" text, - "filename" character varying(20) NOT NULL, - "main_url" character varying(255), - "is_published" boolean DEFAULT '0' NOT NULL, - Constraint "feature_pkey" Primary Key ("id") -); - --- --- TOC Entry ID 22 (OID 29078) --- --- Name: webdb_users Type: TABLE Owner: postgres --- +CREATE SEQUENCE "webdb_users_id_seq" start 1 increment 1 maxvalue 2147483647 minvalue 1 cache 1 ; CREATE TABLE "webdb_users" ( "id" integer DEFAULT nextval('webdb_users_id_seq'::text) NOT NULL, - "login" character varying(16) NOT NULL, - "password" character varying(16) NOT NULL, + "login" character varying(16) UNIQUE NOT NULL, + "password" character varying(255) NOT NULL, "is_admin" boolean DEFAULT '0' NOT NULL, - Constraint "webdb_users_pkey" Primary Key ("id") + "comment" text, + "is_disabled" boolean DEFAULT '0' NOT NULL, + "email" character varying(255) DEFAULT '' NOT NULL, + "profile" text, + "webdb_create" timestamp with time zone NOT NULL, + "lastlogin" timestamp with time zone, + CONSTRAINT "webdb_users_pkey" Primary Key ("id") ); --- --- TOC Entry ID 23 (OID 29096) --- --- Name: content_x_topic Type: TABLE Owner: postgres --- - -CREATE TABLE "content_x_topic" ( - "content_id" integer NOT NULL, - "topic_id" integer NOT NULL -); -- --- TOC Entry ID 24 (OID 29107) --- --- Name: article_type Type: TABLE Owner: postgres +-- article type -- +CREATE SEQUENCE "article_type_id_seq" start 1 increment 1 maxvalue 2147483647 minvalue 1 cache 1 ; + CREATE TABLE "article_type" ( - "id" integer NOT NULL, - "name" character varying(20) NOT NULL + "id" integer DEFAULT nextval('article_type_id_seq') NOT NULL, + "name" character varying(40) NOT NULL, + CONSTRAINT "article_type_pkey" PRIMARY KEY ("id") ); -- --- TOC Entry ID 25 (OID 29118) --- --- Name: topic Type: TABLE Owner: postgres +-- topic -- +CREATE SEQUENCE "topic_id_seq" start 1 increment 1 maxvalue 2147483647 minvalue 1 cache 1 ; + CREATE TABLE "topic" ( "id" integer DEFAULT nextval('topic_id_seq'::text) NOT NULL, "parent_id" integer DEFAULT '0' NOT NULL, @@ -272,79 +118,112 @@ CREATE TABLE "topic" ( Constraint "topic_pkey" Primary Key ("id") ); +CREATE INDEX "idx_topic_title" on "topic" using btree ( "title" "varchar_ops" ); + + +-- +-- content_x_topics -- --- TOC Entry ID 26 (OID 29154) + +CREATE TABLE "content_x_topic" ( + "content_id" integer NOT NULL, + "topic_id" integer NOT NULL +); + +CREATE UNIQUE INDEX "idx_content" on "content_x_topic" using btree ( "content_id" "int4_ops", "topic_id" "int4_ops" ); +CREATE UNIQUE INDEX "idx_topic" on "content_x_topic" using btree ( "topic_id" "int4_ops", "content_id" "int4_ops" ); + -- --- Name: comment Type: TABLE Owner: postgres +-- comment -- +CREATE SEQUENCE "comment_id_seq" start 1 increment 1 maxvalue 2147483647 minvalue 1 cache 1 ; CREATE TABLE "comment" ( - "id" integer DEFAULT nextval('comment_id_seq'::text) NOT NULL, - "title" character varying(80) NOT NULL, - "creator" character varying(80) NOT NULL, - "description" text NOT NULL, - "main_url" character varying(255), - "email" character varying(80), - "address" character varying(80), - "phone" character varying(20), - "webdb_create" timestamp with time zone NOT NULL, - "is_published" boolean DEFAULT '1' NOT NULL, - "to_language" integer DEFAULT '0' NOT NULL, - "to_media" integer NOT NULL, - "to_comment_status" smallint, - "checksum" integer, - Constraint "comment_pkey" Primary Key ("id") + "id" integer DEFAULT nextval('comment_id_seq'::text) NOT NULL, + "title" character varying(80) NOT NULL, + "creator" character varying(80) NOT NULL, + "description" text NOT NULL, + "main_url" character varying(255), + "email" character varying(80), + "address" character varying(80), + "phone" character varying(20), + "webdb_create" timestamp with time zone NOT NULL, + "webdb_lastchange" timestamp with time zone, + "is_published" boolean DEFAULT '1' NOT NULL, + "to_language" integer DEFAULT '0' NOT NULL, + "to_media" integer NOT NULL, + "to_comment_status" smallint, + "comment" text, + "is_html" boolean DEFAULT '0' NOT NULL, + Constraint "comment_pkey" Primary Key ("id") ); +CREATE INDEX "idx_comment_to_media" on "comment" using btree ( "to_media" "int4_ops" ); +CREATE INDEX idx_comment_webdb_create on comment(webdb_create); +CREATE INDEX "idx_comment_tomedia_ispublished" on "comment" using btree ( "to_media" "int4_ops", "is_published" "bool_ops" ); + + + + CREATE TABLE "comment_x_media" ( + "comment_id" integer, + "media_id" integer + ); + + CREATE UNIQUE INDEX idx_comment_media on comment_x_media (comment_id, media_id); + CREATE UNIQUE INDEX idx_media_comment on comment_x_media (media_id, comment_id); + + -- --- TOC Entry ID 27 (OID 29196) +-- media -- --- Name: media Type: TABLE Owner: postgres + +CREATE SEQUENCE "media_id_seq" start 1 increment 1 maxvalue 2147483647 minvalue 1 cache 1 ; + +-- +-- uploaded_media -- -CREATE TABLE "media" ( +CREATE TABLE "uploaded_media" ( "id" integer DEFAULT nextval('media_id_seq'::text) NOT NULL, - "title" character varying(80) NOT NULL, - "subtitle" character varying(30), - "edittitle" character varying(30), + "title" character varying(255), + "subtitle" character varying(255), + "edittitle" character varying(255), "date" character(8) NOT NULL, - "place" character varying(80), "creator" character varying(80), "creator_main_url" character varying(255), "creator_email" character varying(80), "creator_address" character varying(80), "creator_phone" character varying(20), "description" text, - "keywords" text, "comment" text, "source" character varying(255), - "publish_date" timestamp with time zone, "publish_server" character varying(255), "publish_path" character varying(255), "is_published" boolean DEFAULT '0' NOT NULL, - "to_feature" integer DEFAULT '0' NOT NULL, + "is_produced" boolean DEFAULT '0' NOT NULL, "to_media_folder" integer DEFAULT '0' NOT NULL, "to_media_type" smallint DEFAULT '0' NOT NULL, - "to_creator" integer DEFAULT '0' NOT NULL, "to_publisher" integer NOT NULL, "to_language" integer DEFAULT '0', "to_rights" integer DEFAULT '0', "webdb_create" timestamp with time zone NOT NULL, "webdb_lastchange" timestamp with time zone, - "to_media" integer + "icon_is_produced" boolean DEFAULT '0' NOT NULL, + "icon_path" character varying(255), + "size" integer, + Constraint "uploaded_media_pkey" Primary Key ("id") ); +CREATE UNIQUE INDEX "idx_uploaded_media_id" on "uploaded_media" using btree ( "id" "int4_ops" ); +CREATE UNIQUE INDEX "idx_uploaded_media_is_published" on "uploaded_media" using btree ( "id" "int4_ops", "is_published" "bool_ops" ); + -- --- TOC Entry ID 28 (OID 29257) --- --- Name: images Type: TABLE Owner: postgres +-- images -- CREATE TABLE "images" ( - "image_data" oid, - "icon_data" oid, - "icon_path" character varying(255), - "icon_is_produced" boolean DEFAULT '0' NOT NULL, + "image_data" bytea, + "icon_data" bytea, "year" character varying(40), "img_width" smallint, "img_height" smallint, @@ -355,253 +234,214 @@ CREATE TABLE "images" ( "icon_width" smallint, "icon_height" smallint ) -INHERITS ("media"); +INHERITS ("uploaded_media"); --- --- TOC Entry ID 29 (OID 29338) --- --- Name: content Type: TABLE Owner: postgres --- +CREATE INDEX "idx_images_is_published" on "images" using btree ( "is_published" "bool_ops", "icon_is_produced" "bool_ops" ); +CREATE UNIQUE INDEX "idx_images_id" on "images" using btree ( "id" "int4_ops" ); -CREATE TABLE "content" ( - "content_data" text, - "link_url" character varying(255), - "date_from" character varying(8), - "date_to" character varying(8), - "date_name" character varying(255), - "is_html" boolean DEFAULT '0' NOT NULL, - "is_produced" boolean DEFAULT '0' NOT NULL, - "is_stored" boolean DEFAULT '0' NOT NULL, - "is_mail_sent" boolean DEFAULT '1' NOT NULL, - "is_digest_sent" boolean DEFAULT '1' NOT NULL, - "to_article_type" smallint DEFAULT '0' NOT NULL, - "to_content" integer + -- + -- img_format + -- + + CREATE TABLE "img_format" ( + "id" smallint NOT NULL, + "name" character varying(20) NOT NULL, + "extension" character varying(10) NOT NULL, + "mimetype" character varying(40) NOT NULL, + "commment" character varying(255) + ); + + -- + -- img_layout + -- + + CREATE TABLE "img_layout" ( + "id" smallint NOT NULL, + "name" character varying(20) NOT NULL + ); + + -- + -- img_type + -- + + CREATE TABLE "img_type" ( + "id" smallint NOT NULL, + "name" character varying(30) NOT NULL + ); + + -- + -- img_color + -- + + CREATE TABLE "img_color" ( + "id" smallint NOT NULL, + "name" character varying(30) NOT NULL + ); + + +-- +-- audio +-- + +CREATE TABLE "audio" ( + "kbits" smallint ) -INHERITS ("media"); +INHERITS ("uploaded_media"); --- --- TOC Entry ID 30 (OID 29418) --- --- Name: breaking Type: TABLE Owner: postgres --- - -CREATE TABLE "breaking" ( - "id" integer DEFAULT nextval('breaking_id_seq'::text) NOT NULL, - "text" character varying(255) NOT NULL, - "webdb_create" timestamp with time zone NOT NULL -); - --- --- TOC Entry ID 31 (OID 29431) --- --- Name: messages Type: TABLE Owner: postgres --- - -CREATE TABLE "messages" ( - "id" integer DEFAULT nextval('messages_id_seq'::text) NOT NULL, - "title" character varying(30), - "description" character varying(255) NOT NULL, - "creator" character varying(30) NOT NULL, - "webdb_create" timestamp with time zone NOT NULL -); +CREATE INDEX "idx_audio_is_published_produced" on "audio" using btree ( "is_published" "bool_ops", "is_produced" "bool_ops" ); +CREATE UNIQUE INDEX "idx_audio_id" on "audio" using btree ( "id" "int4_ops" ); -- --- TOC Entry ID 32 (OID 29446) +-- video -- --- Name: uploaded_media Type: TABLE Owner: postgres --- - -CREATE TABLE "uploaded_media" ( - -) INHERITS ("media"); --- --- TOC Entry ID 33 (OID 30026) --- --- Name: comment_status Type: TABLE Owner: postgres --- +CREATE TABLE "video" ( +) +INHERITS ("uploaded_media"); -CREATE TABLE "comment_status" ( - "id" smallint NOT NULL, - "name" character varying(40) NOT NULL -); +CREATE INDEX "idx_video_is_published_produced" on "video" using btree ( "is_published" "bool_ops", "is_produced" "bool_ops" ); +CREATE UNIQUE INDEX "idx_video_id" on "video" using btree ( "id" "int4_ops" ); -- --- TOC Entry ID 34 (OID 30064) +-- other_media -- --- Name: content_x_media Type: TABLE Owner: postgres --- - -CREATE TABLE "content_x_media" ( - "content_id" integer, - "media_id" integer -); --- --- TOC Entry ID 11 (OID 32812) --- --- Name: links_imcs_id_seq Type: SEQUENCE Owner: postgres --- +CREATE TABLE "other_media" ( +) +INHERITS ("uploaded_media"); -CREATE SEQUENCE "links_imcs_id_seq" start 1 increment 1 maxvalue 2147483647 minvalue 1 cache 1 ; +CREATE INDEX "idx_othermedia_is_published_produced" on "other_media" using btree ( "is_published" "bool_ops", "is_produced" "bool_ops" ); +CREATE UNIQUE INDEX "idx_othermedia_id" on "other_media" using btree ( "id" "int4_ops" ); -- --- TOC Entry ID 35 (OID 32831) --- --- Name: links_imcs Type: TABLE Owner: postgres +-- content -- -CREATE TABLE "links_imcs" ( - "id" integer DEFAULT nextval('links_imcs_id_seq'::text) NOT NULL, - "to_parent_id" integer, - "title" character varying(80) NOT NULL, - "url" character varying(255) NOT NULL, - "sortpriority" integer DEFAULT '1', - "to_language" integer DEFAULT '0' NOT NULL, - Constraint "links_imcs_pkey" Primary Key ("id") +CREATE TABLE "content" ( + "id" integer DEFAULT nextval('media_id_seq'::text) NOT NULL, + "title" character varying(255), + "subtitle" character varying(255), + "edittitle" character varying(255), + "date" character(8) NOT NULL, + "creator" character varying(80), + "creator_main_url" character varying(255), + "creator_email" character varying(80), + "creator_address" character varying(80), + "creator_phone" character varying(80), + "description" text, + "comment" text, + "source" character varying(255), + "is_published" boolean DEFAULT '0' NOT NULL, + "is_produced" boolean DEFAULT '0' NOT NULL, + "to_publisher" integer NOT NULL, + "to_language" integer DEFAULT '0', + "to_rights" integer DEFAULT '0', + "webdb_create" timestamp with time zone NOT NULL, + "webdb_lastchange" timestamp with time zone, + "content_data" text, + "is_html" boolean DEFAULT '0' NOT NULL, + "to_article_type" smallint DEFAULT '0' NOT NULL, + "to_content" integer, + "keywords" text, + "to_locking_user" integer, + Constraint "content_pkey" Primary Key ("id") ); --- --- TOC Entry ID 40 (OID 29078) --- --- Name: "idx_webdb_user_log_pas_is_admin" Type: INDEX Owner: postgres --- - -CREATE INDEX "idx_webdb_user_log_pas_is_admin" on "webdb_users" using btree ( "login" "varchar_ops", "password" "varchar_ops", "is_admin" "bool_ops" ); - --- --- TOC Entry ID 44 (OID 29078) --- --- Name: "idx_webdb_user_log_pas" Type: INDEX Owner: postgres --- -CREATE INDEX "idx_webdb_user_log_pas" on "webdb_users" using btree ( "login" "varchar_ops", "password" "varchar_ops" ); +CREATE INDEX "idx_content_to_article_type" on "content" using btree ( "to_article_type" "int2_ops" ); +CREATE INDEX "idx_content_is_produced" on "content" using btree ( "is_produced" "bool_ops" ); +CREATE INDEX "idx_content_is_published__to_ar" on "content" using btree ( "is_published" "bool_ops", "to_article_type" "int2_ops" ); +CREATE INDEX "idx_content_is_published__id" on "content" using btree ( "is_published" "bool_ops", "id" "int4_ops" ); +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" ); +CREATE INDEX "idx_content_is_published" on "content" using btree ( "is_published" "bool_ops" ); +CREATE INDEX idx_content_webdb_create on content(webdb_create); --- --- TOC Entry ID 43 (OID 29096) --- --- Name: "idx_content" Type: INDEX Owner: postgres --- -CREATE UNIQUE INDEX "idx_content" on "content_x_topic" using btree ( "content_id" "int4_ops", "topic_id" "int4_ops" ); + -- content_x_media --- --- TOC Entry ID 45 (OID 29096) --- --- Name: "idx_topic" Type: INDEX Owner: postgres --- + CREATE TABLE "content_x_media" ( + "content_id" integer, + "media_id" integer + ); -CREATE UNIQUE INDEX "idx_topic" on "content_x_topic" using btree ( "topic_id" "int4_ops", "content_id" "int4_ops" ); + CREATE INDEX "idx_cxm_content" on "content_x_media" using btree ( "content_id" "int4_ops" ); + CREATE INDEX "idx_cxm_media" on "content_x_media" using btree ( "media_id" "int4_ops" ); -- --- TOC Entry ID 46 (OID 29118) +-- breaking -- --- Name: "idx_topic_title" Type: INDEX Owner: postgres --- - -CREATE INDEX "idx_topic_title" on "topic" using btree ( "title" "varchar_ops" ); - --- --- TOC Entry ID 51 (OID 29118) --- --- Name: "idx_topic_id" Type: INDEX Owner: postgres --- - -CREATE UNIQUE INDEX "idx_topic_id" on "topic" using btree ( "id" "int4_ops" ); - --- --- TOC Entry ID 36 (OID 29154) --- --- Name: "idx_comment_to_media" Type: INDEX Owner: postgres --- - -CREATE INDEX "idx_comment_to_media" on "comment" using btree ( "to_media" "int4_ops" ); - --- --- TOC Entry ID 47 (OID 29257) --- --- Name: "idx_images_is_published__icon_i" Type: INDEX Owner: postgres --- - -CREATE INDEX "idx_images_is_published__icon_i" on "images" using btree ( "is_published" "bool_ops", "icon_is_produced" "bool_ops" ); --- --- TOC Entry ID 49 (OID 29257) --- --- Name: "idx_images_id" Type: INDEX Owner: postgres --- +CREATE SEQUENCE "breaking_id_seq" start 1 increment 1 maxvalue 2147483647 minvalue 1 cache 1 ; -CREATE UNIQUE INDEX "idx_images_id" on "images" using btree ( "id" "int4_ops" ); +CREATE TABLE "breaking" ( + "id" integer DEFAULT nextval('breaking_id_seq'::text) NOT NULL, + "text" character varying(255) NOT NULL, + "webdb_create" timestamp with time zone NOT NULL +); -- --- TOC Entry ID 37 (OID 29338) --- --- Name: "idx_content_to_article_type" Type: INDEX Owner: postgres +-- messages -- -CREATE INDEX "idx_content_to_article_type" on "content" using btree ( "to_article_type" "int2_ops" ); +CREATE SEQUENCE "messages_id_seq" start 1 increment 1 maxvalue 2147483647 minvalue 1 cache 1 ; --- --- TOC Entry ID 38 (OID 29338) --- --- Name: "idx_content_is_produced" Type: INDEX Owner: postgres --- +CREATE TABLE "messages" ( + "id" integer DEFAULT nextval('messages_id_seq'::text) NOT NULL, + "title" character varying(30), + "description" character varying(255) NOT NULL, + "creator" character varying(30) NOT NULL, + "webdb_create" timestamp with time zone NOT NULL +); -CREATE INDEX "idx_content_is_produced" on "content" using btree ( "is_produced" "bool_ops" ); -- --- TOC Entry ID 39 (OID 29338) --- --- Name: "idx_content_is_published__to_ar" Type: INDEX Owner: postgres +-- filter -- -CREATE INDEX "idx_content_is_published__to_ar" on "content" using btree ( "is_published" "bool_ops", "to_article_type" "int2_ops" ); +CREATE SEQUENCE "filter_id_seq" start 1 increment 1 maxvalue 2147483647 minvalue 1 cache 1 ; --- --- TOC Entry ID 41 (OID 29338) --- --- Name: "idx_content_is_stored" Type: INDEX Owner: postgres --- - -CREATE INDEX "idx_content_is_stored" on "content" using btree ( "is_stored" "bool_ops" ); +CREATE TABLE "filter" ( + "id" integer DEFAULT nextval('filter_id_seq'::text) NOT NULL, + "priority" integer, + "filter_group_id" integer, + "type" character varying(255) NOT NULL, + "expression" character varying(255) NOT NULL, + "tag" character varying(255) NOT NULL, + "comment" text, + "articleaction" character varying(255) NOT NULL, + "commentaction" character varying(255) NOT NULL, + "last_hit" timestamp with time zone +); -- --- TOC Entry ID 42 (OID 29338) --- --- Name: "idx_content_is_published__id" Type: INDEX Owner: postgres +-- filter_group -- -CREATE INDEX "idx_content_is_published__id" on "content" using btree ( "is_published" "bool_ops", "id" "int4_ops" ); +CREATE SEQUENCE "filter_group_id_seq" start 1 increment 1 maxvalue 2147483647 minvalue 1 cache 1 ; --- --- TOC Entry ID 48 (OID 29338) --- --- Name: "idx_content_is_pub__to_art__to_" Type: INDEX Owner: postgres --- - -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" ); +CREATE TABLE "filter_group" ( + "id" integer DEFAULT nextval('filter_group_id_seq'::text) NOT NULL, + "name" character varying(255), + "priority" integer +); -- --- TOC Entry ID 50 (OID 29338) +-- db_patches -- --- Name: "idx_content_id" Type: INDEX Owner: postgres --- - -CREATE UNIQUE INDEX "idx_content_id" on "content" using btree ( "id" "int4_ops" ); --- --- TOC Entry ID 52 (OID 30064) --- --- Name: "idx_content_media" Type: INDEX Owner: postgres --- +CREATE SEQUENCE "db_patches_id_seq" start 1 increment 1 maxvalue 2147483647 minvalue 1 cache 1 ; -CREATE UNIQUE INDEX "idx_content_media" on "content_x_media" using btree ( "content_id" "int4_ops", "media_id" "int4_ops" ); +CREATE TABLE "db_patches" ( + "id" integer DEFAULT nextval('db_patches_id_seq'::text) NOT NULL, + "date" date NOT NULL, + "description" text +); -- --- TOC Entry ID 53 (OID 30064) --- --- Name: "idx_media_content" Type: INDEX Owner: postgres +-- model_version -- -CREATE UNIQUE INDEX "idx_media_content" on "content_x_media" using btree ( "media_id" "int4_ops", "content_id" "int4_ops" ); +CREATE TABLE "model_version" ( + "description" character varying(24) +);