--
-- PostgreSQL database dump
--

-- Dumped from database version 10.4
-- Dumped by pg_dump version 12.2

-- Started on 2022-04-20 13:46:57

SET statement_timeout = 0;
SET lock_timeout = 0;
SET idle_in_transaction_session_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;
SELECT pg_catalog.set_config('search_path', '', false);
SET check_function_bodies = false;
SET xmloption = content;
SET client_min_messages = warning;
SET row_security = off;

--
-- TOC entry 198 (class 1259 OID 68921)
-- Name: Annotation; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public."Annotation" (
    "ID" uuid NOT NULL,
    "Create" timestamp with time zone NOT NULL,
    "RuleTitle" character varying(400),
    "BeginChar" integer,
    "EndChar" integer,
    "Typ" character varying(100),
    "Text" text,
    "CorrectText" text,
    "EntityID" uuid,
    "InstanceID" uuid,
    "Comment" text,
    "DocumentID" character varying(400),
    "Aspect" character varying(400),
    "Path" character varying(400),
    "ProblemID" uuid,
    "AspectID" uuid,
    "SourceItemID" uuid,
    "SourceID" uuid,
    "Status" character varying(100),
    "CommentAdmin" text,
    "RuleID" uuid,
    "FileID" uuid,
    "IsDeleted" boolean,
    "ProblemName" text,
    "ProblemCode" text
);


--
-- TOC entry 199 (class 1259 OID 68927)
-- Name: BlockerTask; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public."BlockerTask" (
    "ID" uuid NOT NULL,
    "BlockingItemID" uuid,
    "State" character varying(50),
    "Error" character varying
);


--
-- TOC entry 200 (class 1259 OID 68933)
-- Name: CommentExpert; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public."CommentExpert" (
    "ID" uuid NOT NULL,
    "Expert" character varying(400) NOT NULL,
    "Comment" text NOT NULL,
    "AnnotationID" uuid NOT NULL,
    "Create" timestamp with time zone
);


--
-- TOC entry 201 (class 1259 OID 68939)
-- Name: Directory; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public."Directory" (
    "ID" uuid NOT NULL,
    "Name" character varying(200)
);


--
-- TOC entry 202 (class 1259 OID 68942)
-- Name: EntityType; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public."EntityType" (
    "ID" uuid NOT NULL,
    "Code" character varying(300) NOT NULL,
    "Name" character varying(300)
);


--
-- TOC entry 203 (class 1259 OID 68948)
-- Name: File; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public."File" (
    "ID" uuid NOT NULL,
    "FileName" character varying(200) NOT NULL,
    "OriginalFileName" character varying(200) NOT NULL,
    "DirectoryID" uuid,
    "ScoreAccuracyByValue" integer,
    "Status" character varying(200),
    "Data" text,
    "RatingInstanceID" uuid,
    "ScoreRecallByValue" integer,
    "ScoreAccuracyByCoord" integer,
    "ScoreRecallByCoord" integer
);


--
-- TOC entry 204 (class 1259 OID 68954)
-- Name: FileStandard; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public."FileStandard" (
    "ID" uuid NOT NULL,
    "FileID" uuid,
    "Type" character varying(400),
    "Value" text,
    "From" integer,
    "To" integer,
    "Extraction" boolean DEFAULT false
);


--
-- TOC entry 205 (class 1259 OID 68961)
-- Name: Instance; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public."Instance" (
    "ID" uuid NOT NULL,
    "Result" text,
    "ProcessID" uuid NOT NULL,
    "Create" timestamp with time zone,
    "Finish" timestamp with time zone,
    "Status" character varying(50) NOT NULL,
    "UserConfigID" uuid,
    "Score" integer,
    "Start" timestamp with time zone,
    "IsFragment" boolean,
    "Settings" character varying(1000),
    "ResultOriginal" text,
    "IsSofa" boolean,
    "ResultFileID" uuid
);


--
-- TOC entry 206 (class 1259 OID 68967)
-- Name: InstanceFile; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public."InstanceFile" (
    "ID" uuid,
    "InstanceID" uuid,
    "FileID" uuid
);


--
-- TOC entry 207 (class 1259 OID 68970)
-- Name: InstanceFileRating; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public."InstanceFileRating" (
    "ID" uuid NOT NULL,
    "InstanceRatingID" uuid,
    "FileID" uuid,
    "ScoreAccuracyByValue" integer,
    "ScoreRecallByValue" integer,
    "ScoreAccuracyByCoord" integer,
    "ScoreRecallByCoord" integer
);


--
-- TOC entry 208 (class 1259 OID 68973)
-- Name: InstanceRating; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public."InstanceRating" (
    "ID" uuid NOT NULL,
    "InstanceID" uuid,
    "Create" timestamp with time zone
);


--
-- TOC entry 209 (class 1259 OID 68976)
-- Name: InstanceResult; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public."InstanceResult" (
    "ID" uuid NOT NULL,
    "InstanceID" uuid,
    "FileID" uuid,
    "Value" text,
    "Type" character varying(500),
    "Score" integer
);


--
-- TOC entry 210 (class 1259 OID 68982)
-- Name: InstanceResultArea; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public."InstanceResultArea" (
    "ID" uuid NOT NULL,
    "From" integer,
    "To" integer,
    "InstanceResultID" uuid
);


--
-- TOC entry 211 (class 1259 OID 68985)
-- Name: InstanceRule; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public."InstanceRule" (
    "ID" uuid NOT NULL,
    "ProcessID" uuid,
    "ProcessName" character varying(150),
    "RuleTypeName" character varying(150),
    "RuleConfigId" uuid,
    "Status" character varying(50),
    "Rating" double precision,
    "Message" character varying(1000),
    "Error" character varying(1000),
    "Trace" character varying(1000),
    "EntityTypeNames" text,
    "Duration" character varying(20),
    "Start" timestamp with time zone
);


--
-- TOC entry 212 (class 1259 OID 68991)
-- Name: LicenseCheckInfo; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public."LicenseCheckInfo" (
    "ID" uuid,
    "HasLicense" boolean DEFAULT false NOT NULL,
    "LastCheckDate" timestamp without time zone NOT NULL
);


--
-- TOC entry 213 (class 1259 OID 68995)
-- Name: MigrationMetaHistory; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public."MigrationMetaHistory" (
    "ID" uuid NOT NULL,
    "Type" character varying(200),
    "ActionType" character varying(200),
    "RuleFullName" character varying(400),
    "Version" bigint,
    "ColumnName" character varying(200),
    "DbType" character varying(200),
    "DefaultValue" character varying(200),
    "OldColumnName" character varying(200),
    "SourceName" character varying
);


--
-- TOC entry 214 (class 1259 OID 69001)
-- Name: Object; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public."Object" (
    "ID" uuid NOT NULL,
    "TypeID" uuid NOT NULL,
    "ParentID" uuid
);


--
-- TOC entry 215 (class 1259 OID 69004)
-- Name: ObjectValue; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public."ObjectValue" (
    "ID" uuid NOT NULL,
    "ObjectID" uuid NOT NULL,
    "PropertyID" uuid NOT NULL,
    "Value" text,
    "Int32" integer,
    "String" text,
    "Boolean" boolean
);


--
-- TOC entry 216 (class 1259 OID 69010)
-- Name: PlatformConfig; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public."PlatformConfig" (
    "SDKVersion" character varying(5),
    "ID" uuid NOT NULL
);


--
-- TOC entry 217 (class 1259 OID 69013)
-- Name: PostProcessing; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public."PostProcessing" (
    "ID" uuid NOT NULL,
    "Name" character varying(200),
    "TypeID" uuid,
    "RuleFileID" uuid
);


--
-- TOC entry 218 (class 1259 OID 69016)
-- Name: Problem; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public."Problem" (
    "ID" uuid NOT NULL,
    "Name" character varying(200),
    "Description" character varying(200),
    "IsHidden" boolean,
    "RaitingYes" integer DEFAULT 0,
    "RaitingManual" integer,
    "RaitingResetDate" timestamp with time zone,
    "Code" text,
    "Priority" integer
);


--
-- TOC entry 219 (class 1259 OID 69023)
-- Name: Process; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public."Process" (
    "ID" uuid NOT NULL,
    "Name" character varying(200),
    "Code" character varying(200),
    "Description" character varying(200),
    "Status" character varying(50),
    "Statement" text,
    "PostProcessingID" uuid,
    "DisableAutoOffRule" boolean,
    "NeedWorkersCount" integer
);


--
-- TOC entry 220 (class 1259 OID 69029)
-- Name: Property; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public."Property" (
    "ID" uuid NOT NULL,
    "Name" character varying(200),
    "TypeID" uuid NOT NULL,
    "DisplayName" character varying(200),
    "PropertyTypeID" uuid,
    "TypeName" character varying(200),
    "IsNullable" boolean,
    "IsList" boolean,
    "IsEnum" boolean
);


--
-- TOC entry 221 (class 1259 OID 69035)
-- Name: Raiting; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public."Raiting" (
    "ID" uuid NOT NULL,
    "Expert" character varying(400),
    "Value" smallint NOT NULL,
    "AnnotationID" uuid NOT NULL,
    "Create" timestamp without time zone,
    "ExpertFullName" character varying(500),
    "Url" character varying(500),
    "Comment" text,
    "Aspect" character varying(400),
    "SourceID" uuid,
    "AnnotationID2" uuid,
    "Path" character varying(400)
);


--
-- TOC entry 222 (class 1259 OID 69041)
-- Name: Referent; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public."Referent" (
    "ID" integer NOT NULL,
    "Name" character varying(200) NOT NULL
);


--
-- TOC entry 223 (class 1259 OID 69044)
-- Name: Referent_ID_seq; Type: SEQUENCE; Schema: public; Owner: -
--

CREATE SEQUENCE public."Referent_ID_seq"
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


--
-- TOC entry 3745 (class 0 OID 0)
-- Dependencies: 223
-- Name: Referent_ID_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--

ALTER SEQUENCE public."Referent_ID_seq" OWNED BY public."Referent"."ID";


--
-- TOC entry 224 (class 1259 OID 69046)
-- Name: Rule; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public."Rule" (
    "ID" uuid NOT NULL,
    "Name" character varying(200) NOT NULL,
    "RuleTypeID" uuid NOT NULL,
    "ConfigTypeID" uuid NOT NULL,
    "Status" character varying(50),
    "RuleFileID" uuid,
    "Version" character varying(100),
    "SDKVersion" character varying(100),
    "MigrationVersion" bigint DEFAULT 0 NOT NULL
);


--
-- TOC entry 225 (class 1259 OID 69050)
-- Name: RuleConfig; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public."RuleConfig" (
    "ID" uuid NOT NULL,
    "RuleID" uuid NOT NULL,
    "ProcessID" uuid,
    "Data" text,
    "ObjectID" uuid,
    "Status" character varying(50),
    "Config" text,
    "Documentory" character varying(500),
    "UserConfigID" uuid,
    "RaitingLimit" integer DEFAULT 3,
    "RaitingCurrent" integer,
    "RaitingLimitAutoOffRule" boolean,
    "RaitingAdminSended" boolean,
    "RaitingPercentNegative" integer DEFAULT 30,
    "RaitingResetDate" timestamp with time zone,
    "LastMigrationVersion" bigint,
    "Filters" character varying
);


--
-- TOC entry 226 (class 1259 OID 69058)
-- Name: RuleConfigEntityType; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public."RuleConfigEntityType" (
    "ID" uuid NOT NULL,
    "RuleConfigID" uuid NOT NULL,
    "RuleEntityTypeID" uuid NOT NULL,
    "Name" character varying(300),
    "ProblemID" uuid,
    "NPA" text
);


--
-- TOC entry 227 (class 1259 OID 69064)
-- Name: RuleConfigEntityTypeNPA; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public."RuleConfigEntityTypeNPA" (
    "ID" uuid NOT NULL,
    "Text" text,
    "IsLinked" boolean NOT NULL,
    "DocumentoryUrl" text,
    "RuleConfigEntityTypeID" uuid NOT NULL
);


--
-- TOC entry 228 (class 1259 OID 69070)
-- Name: RuleConfigEntityTypeNPAEntities; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public."RuleConfigEntityTypeNPAEntities" (
    "ID" uuid NOT NULL,
    "RuleConfigEntityTypeNPAID" uuid NOT NULL,
    "Typ" text,
    "Kind" text,
    "IsLaw" boolean DEFAULT false NOT NULL,
    "Number" text,
    "CaseNumber" text,
    "TypeReferent" text,
    "Clause" text,
    "Part" text,
    "DocPart" text,
    "Section" text,
    "SubSection" text,
    "Appendix" text,
    "Chapter" text,
    "Paragraph" text,
    "SubParagraph" text,
    "Item" text,
    "SubItem" text,
    "Indention" text,
    "SubIndention" text,
    "Preamble" text,
    "Notice" text,
    "Page" text,
    "Subprogram" text,
    "Addagree" text,
    "Name" text,
    "LocalTyp" text,
    "Url" text,
    "TypeName" text,
    "DocId" integer
);


--
-- TOC entry 229 (class 1259 OID 69077)
-- Name: RuleConfigEntityTypeNPAHistory; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public."RuleConfigEntityTypeNPAHistory" (
    "ID" uuid NOT NULL,
    "CreateDate" timestamp with time zone NOT NULL,
    "RuleConfigEntityTypeNPAID" uuid NOT NULL,
    "Text" text
);


--
-- TOC entry 230 (class 1259 OID 69083)
-- Name: RuleConfigEntityTypeRaiting; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public."RuleConfigEntityTypeRaiting" (
    "ID" uuid NOT NULL,
    "RaitingAccept" integer DEFAULT 0 NOT NULL,
    "RaitingNotAccept" integer DEFAULT 0 NOT NULL,
    "WorkMode" character varying(100) DEFAULT 'Вкл'::character varying NOT NULL
);


--
-- TOC entry 231 (class 1259 OID 69089)
-- Name: RuleEntityType; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public."RuleEntityType" (
    "ID" uuid NOT NULL,
    "RuleID" uuid NOT NULL,
    "EntityTypeName" character varying(300) NOT NULL,
    "EntityTypeID" uuid
);


--
-- TOC entry 232 (class 1259 OID 69092)
-- Name: RuleFile; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public."RuleFile" (
    "ID" uuid NOT NULL,
    "FileName" character varying(250),
    "Create" timestamp with time zone
);


--
-- TOC entry 233 (class 1259 OID 69095)
-- Name: RuleStatistics; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public."RuleStatistics" (
    "ID" uuid NOT NULL,
    "ProcessID" uuid NOT NULL,
    "Status" character varying(50),
    "BeginChar" integer,
    "EndChar" integer,
    "DateTimeCreated" timestamp with time zone,
    "ProcessName" character varying(50),
    "Rating" double precision,
    "RuleType" character varying(150),
    "EntityType" character varying(150),
    "RuleConfigId" uuid,
    "Text" text,
    "FileName" character varying(100)
);


--
-- TOC entry 234 (class 1259 OID 69101)
-- Name: SDKFile; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public."SDKFile" (
    "ID" uuid NOT NULL,
    "FileName" character varying(200) NOT NULL,
    "OriginalFileName" character varying(200) NOT NULL,
    "UploadDate" timestamp with time zone NOT NULL,
    "Version" character varying(10)
);


--
-- TOC entry 235 (class 1259 OID 69104)
-- Name: Source; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public."Source" (
    "ID" uuid NOT NULL,
    "Name" character varying(200),
    "RuleConfigID" uuid,
    "SourceType" character varying(200),
    "ItemType" character varying(200),
    "Status" character varying(50),
    "Description" text,
    "ObjectID" uuid NOT NULL,
    "RaitingLimit" integer DEFAULT 3,
    "EnableChange" boolean,
    "RaitingPercentNegative" integer DEFAULT 30,
    "RaitingResetDate" timestamp with time zone,
    "RaitingOk" integer,
    "RaitingOff" integer,
    "RaitingManyNegative" integer,
    "RaitingStop" integer,
    "VisibleToExpert" boolean
);


--
-- TOC entry 236 (class 1259 OID 69112)
-- Name: SourceItemRaiting; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public."SourceItemRaiting" (
    "ID" uuid NOT NULL,
    "SourceID" uuid,
    "ItemID" uuid,
    "RaitingAccept" integer,
    "RaitingNotAccept" integer,
    "Off" boolean,
    "RaitingLimitAutoOff" boolean,
    "Status" character varying(20),
    "IsNorm" boolean DEFAULT true,
    "WorkMode" character varying(10) DEFAULT 'Вкл'::character varying
);


--
-- TOC entry 237 (class 1259 OID 69117)
-- Name: Type; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public."Type" (
    "ID" uuid NOT NULL,
    "Name" character varying(200) NOT NULL,
    "FullName" character varying(200) NOT NULL,
    "PKType" character varying(200),
    "ExtendedEditor" boolean,
    "EnumItems" text
);


--
-- TOC entry 238 (class 1259 OID 69123)
-- Name: UserConfig; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public."UserConfig" (
    "ID" uuid NOT NULL,
    "Data" bytea,
    "Code" character varying(200),
    "Status" character varying(200),
    "InfoMessage" character varying
);


--
-- TOC entry 3516 (class 2604 OID 69129)
-- Name: Referent ID; Type: DEFAULT; Schema: public; Owner: -
--

ALTER TABLE ONLY public."Referent" ALTER COLUMN "ID" SET DEFAULT nextval('public."Referent_ID_seq"'::regclass);


--
-- TOC entry 3529 (class 2606 OID 69755)
-- Name: Annotation Annotation_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public."Annotation"
    ADD CONSTRAINT "Annotation_pkey" PRIMARY KEY ("ID");


--
-- TOC entry 3601 (class 2606 OID 69757)
-- Name: RuleConfigEntityTypeRaiting Aspect_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public."RuleConfigEntityTypeRaiting"
    ADD CONSTRAINT "Aspect_pkey" PRIMARY KEY ("ID");


--
-- TOC entry 3541 (class 2606 OID 69759)
-- Name: BlockerTask BlockerTask_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public."BlockerTask"
    ADD CONSTRAINT "BlockerTask_pkey" PRIMARY KEY ("ID");


--
-- TOC entry 3543 (class 2606 OID 69761)
-- Name: CommentExpert CommentExpert_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public."CommentExpert"
    ADD CONSTRAINT "CommentExpert_pkey" PRIMARY KEY ("ID");


--
-- TOC entry 3545 (class 2606 OID 69763)
-- Name: Directory Directory_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public."Directory"
    ADD CONSTRAINT "Directory_pkey" PRIMARY KEY ("ID");


--
-- TOC entry 3547 (class 2606 OID 69765)
-- Name: EntityType EntityType_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public."EntityType"
    ADD CONSTRAINT "EntityType_pkey" PRIMARY KEY ("ID");


--
-- TOC entry 3552 (class 2606 OID 69767)
-- Name: FileStandard FileStandard_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public."FileStandard"
    ADD CONSTRAINT "FileStandard_pkey" PRIMARY KEY ("ID");


--
-- TOC entry 3550 (class 2606 OID 69769)
-- Name: File File_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public."File"
    ADD CONSTRAINT "File_pkey" PRIMARY KEY ("ID");


--
-- TOC entry 3556 (class 2606 OID 69771)
-- Name: InstanceFileRating InstanceFileRating_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public."InstanceFileRating"
    ADD CONSTRAINT "InstanceFileRating_pkey" PRIMARY KEY ("ID");


--
-- TOC entry 3558 (class 2606 OID 69773)
-- Name: InstanceRating InstanceRating_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public."InstanceRating"
    ADD CONSTRAINT "InstanceRating_pkey" PRIMARY KEY ("ID");


--
-- TOC entry 3562 (class 2606 OID 69775)
-- Name: InstanceResultArea InstanceResultArea_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public."InstanceResultArea"
    ADD CONSTRAINT "InstanceResultArea_pkey" PRIMARY KEY ("ID");


--
-- TOC entry 3560 (class 2606 OID 69777)
-- Name: InstanceResult InstanceResult_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public."InstanceResult"
    ADD CONSTRAINT "InstanceResult_pkey" PRIMARY KEY ("ID");


--
-- TOC entry 3564 (class 2606 OID 69779)
-- Name: InstanceRule InstanceRule_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public."InstanceRule"
    ADD CONSTRAINT "InstanceRule_pkey" PRIMARY KEY ("ID");


--
-- TOC entry 3554 (class 2606 OID 69781)
-- Name: Instance Instance_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public."Instance"
    ADD CONSTRAINT "Instance_pkey" PRIMARY KEY ("ID");


--
-- TOC entry 3572 (class 2606 OID 69783)
-- Name: ObjectValue ObjectValue_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public."ObjectValue"
    ADD CONSTRAINT "ObjectValue_pkey" PRIMARY KEY ("ID");


--
-- TOC entry 3569 (class 2606 OID 69785)
-- Name: Object Object_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public."Object"
    ADD CONSTRAINT "Object_pkey" PRIMARY KEY ("ID");


--
-- TOC entry 3575 (class 2606 OID 69787)
-- Name: PostProcessing PostProcessing_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public."PostProcessing"
    ADD CONSTRAINT "PostProcessing_pkey" PRIMARY KEY ("ID");


--
-- TOC entry 3577 (class 2606 OID 69789)
-- Name: Process Process_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public."Process"
    ADD CONSTRAINT "Process_pkey" PRIMARY KEY ("ID");


--
-- TOC entry 3579 (class 2606 OID 69791)
-- Name: Property Property_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public."Property"
    ADD CONSTRAINT "Property_pkey" PRIMARY KEY ("ID");


--
-- TOC entry 3581 (class 2606 OID 69793)
-- Name: Raiting Raiting_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public."Raiting"
    ADD CONSTRAINT "Raiting_pkey" PRIMARY KEY ("ID");


--
-- TOC entry 3583 (class 2606 OID 69795)
-- Name: Referent Referent_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public."Referent"
    ADD CONSTRAINT "Referent_pkey" PRIMARY KEY ("ID");


--
-- TOC entry 3597 (class 2606 OID 69797)
-- Name: RuleConfigEntityTypeNPAEntities RuleConfigEntityTypeNPAEntities_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public."RuleConfigEntityTypeNPAEntities"
    ADD CONSTRAINT "RuleConfigEntityTypeNPAEntities_pkey" PRIMARY KEY ("ID");


--
-- TOC entry 3599 (class 2606 OID 69799)
-- Name: RuleConfigEntityTypeNPAHistory RuleConfigEntityTypeNPAHistory_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public."RuleConfigEntityTypeNPAHistory"
    ADD CONSTRAINT "RuleConfigEntityTypeNPAHistory_pkey" PRIMARY KEY ("ID");


--
-- TOC entry 3595 (class 2606 OID 69801)
-- Name: RuleConfigEntityTypeNPA RuleConfigEntityTypeNPA_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public."RuleConfigEntityTypeNPA"
    ADD CONSTRAINT "RuleConfigEntityTypeNPA_pkey" PRIMARY KEY ("ID");


--
-- TOC entry 3593 (class 2606 OID 69803)
-- Name: RuleConfigEntityType RuleConfigEntityType_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public."RuleConfigEntityType"
    ADD CONSTRAINT "RuleConfigEntityType_pkey" PRIMARY KEY ("ID");


--
-- TOC entry 3587 (class 2606 OID 69805)
-- Name: RuleConfig RuleConfig_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public."RuleConfig"
    ADD CONSTRAINT "RuleConfig_pkey" PRIMARY KEY ("ID");


--
-- TOC entry 3606 (class 2606 OID 69807)
-- Name: RuleEntityType RuleEntityType_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public."RuleEntityType"
    ADD CONSTRAINT "RuleEntityType_pkey" PRIMARY KEY ("ID");


--
-- TOC entry 3608 (class 2606 OID 69809)
-- Name: RuleFile RuleFile_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public."RuleFile"
    ADD CONSTRAINT "RuleFile_pkey" PRIMARY KEY ("ID");


--
-- TOC entry 3610 (class 2606 OID 69811)
-- Name: RuleStatistics RuleStatistics_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public."RuleStatistics"
    ADD CONSTRAINT "RuleStatistics_pkey" PRIMARY KEY ("ID");


--
-- TOC entry 3585 (class 2606 OID 69813)
-- Name: Rule Rule_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public."Rule"
    ADD CONSTRAINT "Rule_pkey" PRIMARY KEY ("ID");


--
-- TOC entry 3614 (class 2606 OID 69815)
-- Name: SourceItemRaiting SourceItemRaiting_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public."SourceItemRaiting"
    ADD CONSTRAINT "SourceItemRaiting_pkey" PRIMARY KEY ("ID");


--
-- TOC entry 3612 (class 2606 OID 69817)
-- Name: Source Source_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public."Source"
    ADD CONSTRAINT "Source_pkey" PRIMARY KEY ("ID");


--
-- TOC entry 3616 (class 2606 OID 69819)
-- Name: Type Type_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public."Type"
    ADD CONSTRAINT "Type_pkey" PRIMARY KEY ("ID");


--
-- TOC entry 3618 (class 2606 OID 69821)
-- Name: UserConfig UserConfig_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public."UserConfig"
    ADD CONSTRAINT "UserConfig_pkey" PRIMARY KEY ("ID");


--
-- TOC entry 3530 (class 1259 OID 71276)
-- Name: IX_Annotation_AspectID; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX "IX_Annotation_AspectID" ON public."Annotation" USING btree ("AspectID");


--
-- TOC entry 3531 (class 1259 OID 71274)
-- Name: IX_Annotation_DocumentID; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX "IX_Annotation_DocumentID" ON public."Annotation" USING btree ("DocumentID");


--
-- TOC entry 3532 (class 1259 OID 71280)
-- Name: IX_Annotation_FileID; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX "IX_Annotation_FileID" ON public."Annotation" USING btree ("FileID");


--
-- TOC entry 3533 (class 1259 OID 71272)
-- Name: IX_Annotation_ID; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX "IX_Annotation_ID" ON public."Annotation" USING btree ("ID");


--
-- TOC entry 3534 (class 1259 OID 71273)
-- Name: IX_Annotation_InstanceID; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX "IX_Annotation_InstanceID" ON public."Annotation" USING btree ("InstanceID");


--
-- TOC entry 3535 (class 1259 OID 71275)
-- Name: IX_Annotation_ProblemD; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX "IX_Annotation_ProblemD" ON public."Annotation" USING btree ("ProblemID");


--
-- TOC entry 3536 (class 1259 OID 71279)
-- Name: IX_Annotation_RuleID; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX "IX_Annotation_RuleID" ON public."Annotation" USING btree ("RuleID");


--
-- TOC entry 3537 (class 1259 OID 71278)
-- Name: IX_Annotation_SourceID; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX "IX_Annotation_SourceID" ON public."Annotation" USING btree ("SourceID");


--
-- TOC entry 3538 (class 1259 OID 71277)
-- Name: IX_Annotation_SourceItemID; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX "IX_Annotation_SourceItemID" ON public."Annotation" USING btree ("SourceItemID");


--
-- TOC entry 3548 (class 1259 OID 71260)
-- Name: IX_EntityType_ID; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX "IX_EntityType_ID" ON public."EntityType" USING btree ("ID");


--
-- TOC entry 3570 (class 1259 OID 71269)
-- Name: IX_ObjectValue_ID; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX "IX_ObjectValue_ID" ON public."ObjectValue" USING btree ("ID");


--
-- TOC entry 3565 (class 1259 OID 71266)
-- Name: IX_Object_ID; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX "IX_Object_ID" ON public."Object" USING btree ("ID");


--
-- TOC entry 3566 (class 1259 OID 71268)
-- Name: IX_Object_ParentID; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX "IX_Object_ParentID" ON public."Object" USING btree ("ParentID");


--
-- TOC entry 3567 (class 1259 OID 71267)
-- Name: IX_Object_TypeID; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX "IX_Object_TypeID" ON public."Object" USING btree ("TypeID");


--
-- TOC entry 3588 (class 1259 OID 71262)
-- Name: IX_RuleConfigEntityType_ID; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX "IX_RuleConfigEntityType_ID" ON public."RuleConfigEntityType" USING btree ("ID");


--
-- TOC entry 3589 (class 1259 OID 71264)
-- Name: IX_RuleConfigEntityType_ProblemID; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX "IX_RuleConfigEntityType_ProblemID" ON public."RuleConfigEntityType" USING btree ("ProblemID");


--
-- TOC entry 3590 (class 1259 OID 71263)
-- Name: IX_RuleConfigEntityType_RuleConfigID; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX "IX_RuleConfigEntityType_RuleConfigID" ON public."RuleConfigEntityType" USING btree ("RuleConfigID");


--
-- TOC entry 3591 (class 1259 OID 71265)
-- Name: IX_RuleConfigEntityType_RuleEntityTypeID; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX "IX_RuleConfigEntityType_RuleEntityTypeID" ON public."RuleConfigEntityType" USING btree ("RuleEntityTypeID");


--
-- TOC entry 3602 (class 1259 OID 71258)
-- Name: IX_RuleEntityType_EntityTypeID; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX "IX_RuleEntityType_EntityTypeID" ON public."RuleEntityType" USING btree ("EntityTypeID");


--
-- TOC entry 3603 (class 1259 OID 71259)
-- Name: IX_RuleEntityType_ID; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX "IX_RuleEntityType_ID" ON public."RuleEntityType" USING btree ("ID");


--
-- TOC entry 3604 (class 1259 OID 71261)
-- Name: IX_RuleEntityType_RuleID; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX "IX_RuleEntityType_RuleID" ON public."RuleEntityType" USING btree ("RuleID");


--
-- TOC entry 3539 (class 1259 OID 69822)
-- Name: Index_Typ; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX "Index_Typ" ON public."Annotation" USING btree ("Typ");

ALTER TABLE public."Annotation" CLUSTER ON "Index_Typ";


--
-- TOC entry 3573 (class 1259 OID 71281)
-- Name: gjfefrefref; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX gjfefrefref ON public."ObjectValue" USING btree ("ObjectID", "PropertyID", "ID");


--
-- TOC entry 3746 (class 0 OID 0)
-- Dependencies: 3573
-- Name: INDEX gjfefrefref; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON INDEX public.gjfefrefref IS 'qswqw';


-- Completed on 2022-04-20 13:46:59

--
-- PostgreSQL database dump complete
--

