merged 1.1 branch into head
[mir.git] / dbscripts / create_pg.sql
index 31fba74..4070d46 100755 (executable)
@@ -222,8 +222,8 @@ CREATE UNIQUE INDEX "idx_uploaded_media_is_published" on "uploaded_media" using
 --
 
 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,
@@ -393,3 +393,55 @@ CREATE TABLE "messages" (
   "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)
+);
+