CREATE TABLE "webdb_users" (
"id" integer DEFAULT nextval('webdb_users_id_seq'::text) NOT NULL,
- "login" 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,
"comment" text,
- Constraint "webdb_users_pkey" Primary Key ("id")
+ "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")
);
-CREATE INDEX "idx_webdb_user_log_pas_is_admin" on "webdb_users" using btree ( "login" "varchar_ops", "password" "varchar_ops", "is_admin" "bool_ops" );
--
-- article type
);
CREATE INDEX "idx_topic_title" on "topic" using btree ( "title" "varchar_ops" );
-CREATE UNIQUE INDEX "idx_topic_id" on "topic" using btree ( "id" "int4_ops" );
--
"to_language" integer DEFAULT '0' NOT NULL,
"to_media" integer NOT NULL,
"to_comment_status" smallint,
- "checksum" integer,
+ "comment" text,
"is_html" boolean DEFAULT '0' NOT NULL,
Constraint "comment_pkey" Primary Key ("id")
);
-CREATE INDEX "comment_checksum_index" on "comment" using btree ( "checksum" "int4_ops" );
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 UNIQUE INDEX "idx_comment_id" on "comment" using btree ( "id" "int4_ops" );
--
CREATE SEQUENCE "media_id_seq" start 1 increment 1 maxvalue 2147483647 minvalue 1 cache 1 ;
-CREATE TABLE "media" (
+
+--
+-- uploaded_media
+--
+
+CREATE TABLE "uploaded_media" (
"id" integer DEFAULT nextval('media_id_seq'::text) NOT NULL,
"title" character varying(255),
"subtitle" character varying(255),
"description" 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,
"is_produced" boolean DEFAULT '0' NOT NULL,
- "to_feature" integer DEFAULT '0' NOT NULL,
"to_media_folder" integer DEFAULT '0' NOT NULL,
"to_media_type" smallint DEFAULT '0' NOT NULL,
"to_publisher" integer NOT NULL,
"to_rights" integer DEFAULT '0',
"webdb_create" timestamp with time zone NOT NULL,
"webdb_lastchange" timestamp with time zone,
- "to_media" integer
-);
-
---
--- uploaded_media
---
-
-CREATE TABLE "uploaded_media" (
"icon_is_produced" boolean DEFAULT '0' NOT NULL,
"icon_path" character varying(255),
- "size" integer
-)
-INHERITS ("media");
+ "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" );
--
CREATE TABLE "images" (
- "image_data" oid,
- "icon_data" oid,
+ "image_data" bytea,
+ "icon_data" bytea,
"year" character varying(40),
"img_width" smallint,
"img_height" smallint,
)
INHERITS ("uploaded_media");
-CREATE INDEX "idx_images_is_published__icon_i" on "images" using btree ( "is_published" "bool_ops", "icon_is_produced" "bool_ops" );
+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" (
+ "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,
- "checksum" integer
-)
-INHERITS ("media");
+ "keywords" text,
+ "to_locking_user" integer,
+ Constraint "content_pkey" Primary Key ("id")
+);
+
-CREATE INDEX "content_checksum_index" on "content" using btree ( "checksum" "int4_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 UNIQUE INDEX "idx_content_id" on "content" using btree ( "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);
"media_id" integer
);
- CREATE UNIQUE INDEX "idx_content_media" on "content_x_media" using btree ( "content_id" "int4_ops", "media_id" "int4_ops" );
- CREATE UNIQUE INDEX "idx_media_content" on "content_x_media" using btree ( "media_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" );
--
-- breaking
"webdb_create" timestamp with time zone NOT NULL
);
+
+--
+-- filter
+--
+
+CREATE SEQUENCE "filter_id_seq" start 1 increment 1 maxvalue 2147483647 minvalue 1 cache 1 ;
+
+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
+);
+
+--
+-- filter_group
+--
+
+CREATE SEQUENCE "filter_group_id_seq" start 1 increment 1 maxvalue 2147483647 minvalue 1 cache 1 ;
+
+CREATE TABLE "filter_group" (
+ "id" integer DEFAULT nextval('filter_group_id_seq'::text) NOT NULL,
+ "name" character varying(255),
+ "priority" integer
+);
+
+--
+-- db_patches
+--
+
+CREATE SEQUENCE "db_patches_id_seq" start 1 increment 1 maxvalue 2147483647 minvalue 1 cache 1 ;
+
+CREATE TABLE "db_patches" (
+ "id" integer DEFAULT nextval('db_patches_id_seq'::text) NOT NULL,
+ "date" date NOT NULL,
+ "description" text
+);
+
+--
+-- model_version
+--
+
+CREATE TABLE "model_version" (
+ "description" character varying(24)
+);
+