--
-- missing DIs in existing DTs
--

alter table DT443 add (DI001607 varchar2(20 char));

alter table DT447 add (DI062253 varchar2(100 char));

alter table DT447_HIS add (DI062253 varchar2(100 char));

alter table DT461 add (DI061308 varchar2(18 char),
                       DI061314 number(5,0) default 0,
                       DI061342 varchar2(2 char),
                       DI061343 date default TO_DATE('01.01.1970','DD.MM.YYYY'),
                       DI061438 varchar2(8 char),
                       DI062249 varchar2(2 char),
                       DI062250 date default TO_DATE('01.01.1970','DD.MM.YYYY'),
                       DI062251 clob,
                       DI063216 clob,
                       DI063217 clob,
                       DI061344 clob,
                       DI062551 number(10,0) default 0);

alter table DT463 add (DI060043 varchar2(18 char),
                       DI063069 clob);
                       
alter table DT466 add (DI061441 number(10,0) default 0,
                       DI061444 clob);
                       
alter table DT470 add (DI060517 varchar2(20 char),
                       DI060521 varchar2(20 char));
                       
alter table DT480 add (DI063124 date default TO_DATE('01.01.1970','DD.MM.YYYY'),
                       DI063125 varchar2(20 char));
                       
alter table DT484 add( DI059764 varchar2(20 char),
                       DI059765 varchar2(20 char),
                       DI059766 varchar2(40 char));
                       
alter table DT485 add (DI059772 number(5,0) default 0);

alter table DT516 add (DI060035 varchar2(20 char));

alter table DT527 add (DI060012 clob);

alter table DT808 add (DI060038 varchar2(8 char));

alter table DT810 add (DI062994 number(5,0) default 0,
                       DI062988 number(5,0) default 0);

alter table DT812 add (DI062989 number(5,0) default 0,
                       DI062995 number(5,0) default 0);

alter table DT823 add (DI062314 date default TO_DATE('01.01.1970','DD.MM.YYYY'),
                       DI062315 clob,
                       DI061347 varchar2(2 char),
                       DI061348 date default TO_DATE('01.01.1970','DD.MM.YYYY'),
                       DI061349 clob,
                       DI061350 varchar2(2 char),
                       DI061429 number default 0,
                       DI062292 number(5,0) default 0,
                       DI062313 varchar2(2 char),
                       DI062806 number(5,0) default 0,
                       DI062998 varchar2(2 char),
                       DI063000 clob);
                       
alter table DT824 add (DI060044 varchar2(18 char));

--
-- new DTs
--
--
-- DT090
-- 

CREATE TABLE DT090 (STATUSREPORT_ID            VARCHAR2(10 CHAR) NOT NULL,
                    PORTFOLIO_ID               VARCHAR2(18 CHAR) NOT NULL,
                    UUID                       RAW(16) DEFAULT SYS_GUID() NULL,
                    OS_CREATED_ON              DATE DEFAULT TO_DATE('01.01.1970','DD.MM.YYYY') NULL,
                    OS_MODIFIED_ON             DATE DEFAULT TO_DATE('01.01.1970','DD.MM.YYYY') NULL,
                    OS_RWDU                    NUMBER(5,0) DEFAULT 0 NULL,
                    OS_CREATED_BY              VARCHAR2(20 CHAR) NULL,
                    OS_MODIFIED_BY             VARCHAR2(20 CHAR) NULL,
                    OS_LICENCE                 VARCHAR2(4 CHAR) NULL,
                    OS_OPC                     VARCHAR2(8 CHAR) NULL,
                    OS_OWNER                   NUMBER(5,0) DEFAULT 0 NULL,
                    OS_GROUP                   NUMBER(5,0) DEFAULT 0 NULL,
                    OS_ANY                     NUMBER(5,0) DEFAULT 0 NULL,
                    PORTFOLIO_TILE             VARCHAR2(80 CHAR) NULL,
                    PORTFOLIO_MANAGER          VARCHAR2(20 CHAR) NULL,
                    DESCRIPTION                CLOB NULL,
                    ESTIM_PERSONALLY           VARCHAR2(2 CHAR) NULL,
                    ESTIM_BUDGETCOSTS          VARCHAR2(2 CHAR) NULL,
                    ESTIM_REVENUESBENEFIT      VARCHAR2(2 CHAR) NULL,
                    ESTIM_RISKOPPORTUNITIES    VARCHAR2(2 CHAR) NULL,
                    ESTIM_OBJECTIVES           VARCHAR2(2 CHAR) NULL,
                    ESTIM_QUALITY              VARCHAR2(2 CHAR) NULL,
                    ESTIM_DATE_PERSONALLY      DATE DEFAULT TO_DATE('01.01.1970','DD.MM.YYYY') NULL,
                    ESTIM_DATE_BUDGETCOSTS     DATE DEFAULT TO_DATE('01.01.1970','DD.MM.YYYY') NULL,
                    ESTIM_DATE_REVENUESBENEFIT DATE DEFAULT TO_DATE('01.01.1970','DD.MM.YYYY') NULL,
                    ESTIM_DATE                 DATE DEFAULT TO_DATE('01.01.1970','DD.MM.YYYY') NULL,
                    ESTIM_DATE_OBJECTIVES      DATE DEFAULT TO_DATE('01.01.1970','DD.MM.YYYY') NULL,
                    ESTIM_DATE_QUALITY         DATE DEFAULT TO_DATE('01.01.1970','DD.MM.YYYY') NULL,
                    COMM_PERSONALLY            CLOB NULL,
                    COMM_BUDGETCOSTS           CLOB NULL,
                    COMM_REVENUESBENEFIT       CLOB NULL,
                    COMM_RISKOPPORTUNITIES     CLOB NULL,
                    COMM_OBJECTIVES            CLOB NULL,
                    COMM_QUALITY               CLOB NULL,
                    PPM_GROUP_DIM_1            VARCHAR2(8 CHAR) NULL,
                    PPM_GROUP_DIM_2            VARCHAR2(8 CHAR) NULL,
                    POSSIBLE_DAMAGE            NUMBER DEFAULT 0 NULL,
                    PROBABLE_RISK              NUMBER DEFAULT 0 NULL,
                    PROBABLE_DAMAGE            NUMBER DEFAULT 0 NULL,
                    DAMAGE_INCURRED            NUMBER DEFAULT 0 NULL,
                    POSSIBLE_OPPORTUNITY       NUMBER DEFAULT 0 NULL,
                    PROBABLE_OPPORTUNITY       NUMBER DEFAULT 0 NULL,
                    PROBABLE_OPPORTUNITY_2     NUMBER DEFAULT 0 NULL,
                    PROFIT_ACHIEVED            NUMBER DEFAULT 0 NULL,
                    LAST_REPORT_ID             VARCHAR2(10 CHAR) NULL,
                    DATE_MEASURES              DATE DEFAULT TO_DATE('01.01.1970','DD.MM.YYYY') NULL,
                    DATE_NEXT_STEPS            DATE DEFAULT TO_DATE('01.01.1970','DD.MM.YYYY') NULL,
                    COMM_MEASURES              CLOB NULL,
                    COMM_NEXT_STEPS            CLOB NULL,
                    LAST_UPDATE                VARCHAR2(20 CHAR) NULL,
                    PORTFOLIO_TYPE             NUMBER(5,0) DEFAULT 0 NULL,
                    PF_REPORT_NAME             VARCHAR2(120 CHAR) NULL,
                    PF_REPORT_APPROVED         NUMBER(5,0) DEFAULT 0 NULL,
                    PF_APPROVED_DATE           DATE DEFAULT TO_DATE('01.01.1970','DD.MM.YYYY') NULL,
                    PF_APPROVED_BY             VARCHAR2(20 CHAR) NULL,
                    PF_REPORT_COMMENTAR        CLOB NULL,
                    STATUS                     DATE DEFAULT TO_DATE('01.01.1970','DD.MM.YYYY') NULL,
                    DI062224                   VARCHAR2(10 CHAR) NULL,
                    DI062225                   VARCHAR2(10 CHAR) NULL,
                    DI062226                   VARCHAR2(10 CHAR) NULL,
                    DI062227                   VARCHAR2(10 CHAR) NULL,
                    DI062230                   VARCHAR2(50 CHAR) NULL,
                    DI062239                   NUMBER(5,0) DEFAULT 0 NULL,
                    DI062240                   VARCHAR2(2 CHAR) NULL,
                    DI062241                   VARCHAR2(2 CHAR) NULL,
                    DI062242                   DATE DEFAULT TO_DATE('01.01.1970','DD.MM.YYYY') NULL,
                    DI062243                   DATE DEFAULT TO_DATE('01.01.1970','DD.MM.YYYY') NULL,
                    DI062244                   CLOB NULL,
                    DI062245                   CLOB NULL,
                    DI062323                   VARCHAR2(10 CHAR) NULL,
                    DI062985                   NUMBER(5,0) DEFAULT 0 NULL,
                    DI062993                   DATE DEFAULT TO_DATE('01.01.1970','DD.MM.YYYY') NULL)
    PCTFREE 10 INITRANS 1 MAXTRANS 255
    STORAGE (INITIAL 64K
             NEXT 1024K
             MINEXTENTS 1
             MAXEXTENTS 2147483645);
CREATE INDEX SIDT870DT090 ON DT090 (PORTFOLIO_ID ASC)
    PCTFREE 10 INITRANS 2 MAXTRANS 255
    STORAGE (INITIAL 64K
             NEXT 1024K
             MINEXTENTS 1
             MAXEXTENTS 2147483645);
CREATE UNIQUE INDEX PID090DT090 ON DT090 (STATUSREPORT_ID ASC, PORTFOLIO_ID ASC)
    PCTFREE 10 INITRANS 2 MAXTRANS 255
    STORAGE (INITIAL 64K
             NEXT 1024K
             MINEXTENTS 1
             MAXEXTENTS 2147483645);

ALTER TABLE DT090 ADD CONSTRAINT UUID_UNIQUE_090 UNIQUE (UUID)
                                                 DEFERRABLE INITIALLY IMMEDIATE
                                                 DISABLE;
ALTER TABLE DT090 ADD CONSTRAINT PID090DT090 PRIMARY KEY (STATUSREPORT_ID,PORTFOLIO_ID)
                                             NOT DEFERRABLE
                                             DISABLE;

--
-- DT091
-- 

CREATE TABLE DT091 (STATUSREPORT_ID               VARCHAR2(10 CHAR) NOT NULL,
                    PORTFOLIO_ID                  VARCHAR2(18 CHAR) NOT NULL,
                    PERIOD_ID                     NUMBER(10,0) DEFAULT 0 NOT NULL,
                    UUID                          RAW(16) DEFAULT SYS_GUID() NULL,
                    OS_CREATED_ON                 DATE DEFAULT TO_DATE('01.01.1970','DD.MM.YYYY') NULL,
                    OS_MODIFIED_ON                DATE DEFAULT TO_DATE('01.01.1970','DD.MM.YYYY') NULL,
                    OS_RWDU                       NUMBER(5,0) DEFAULT 0 NULL,
                    OS_CREATED_BY                 VARCHAR2(20 CHAR) NULL,
                    OS_MODIFIED_BY                VARCHAR2(20 CHAR) NULL,
                    OS_LICENCE                    VARCHAR2(4 CHAR) NULL,
                    OS_OPC                        VARCHAR2(8 CHAR) NULL,
                    OS_OWNER                      NUMBER(5,0) DEFAULT 0 NULL,
                    OS_GROUP                      NUMBER(5,0) DEFAULT 0 NULL,
                    OS_ANY                        NUMBER(5,0) DEFAULT 0 NULL,
                    PF_NAME                       VARCHAR2(30 CHAR) NULL,
                    PORTFOLIO_MANAGER             VARCHAR2(20 CHAR) NULL,
                    INTERNAL_BUDGET               NUMBER DEFAULT 0 NULL,
                    EXTERNAL_BUDGET               NUMBER DEFAULT 0 NULL,
                    INVEST_BUDGET                 NUMBER DEFAULT 0 NULL,
                    MISC_BUDGET                   NUMBER DEFAULT 0 NULL,
                    INT_EFFORT_BUDGET             NUMBER DEFAULT 0 NULL,
                    EXT_EFFORT_BUDGET             NUMBER DEFAULT 0 NULL,
                    DESCRIPTION                   CLOB NULL,
                    VALID_FROM                    DATE DEFAULT TO_DATE('01.01.1970','DD.MM.YYYY') NULL,
                    VALID_UNTIL                   DATE DEFAULT TO_DATE('01.01.1970','DD.MM.YYYY') NULL,
                    RELEASED                      NUMBER(5,0) DEFAULT 0 NULL,
                    BDGT_FOR_MAT_COSTS            NUMBER DEFAULT 0 NULL,
                    APPR_PERSON_INTERNAL          NUMBER DEFAULT 0 NULL,
                    APPR_PERSON_EXTERNAL          NUMBER DEFAULT 0 NULL,
                    APPR_INVEST                   NUMBER DEFAULT 0 NULL,
                    APPR_MISC                     NUMBER DEFAULT 0 NULL,
                    APPR_MATERIAL_COSTS           NUMBER DEFAULT 0 NULL,
                    APPROVED_EFFORT               NUMBER DEFAULT 0 NULL,
                    APPROVED_EFFORT_EXTERN        NUMBER DEFAULT 0 NULL,
                    APPROVED_EFFORT_INTERN        NUMBER DEFAULT 0 NULL,
                    COMPLETED                     NUMBER(5,0) DEFAULT 0 NULL,
                    PF_ACTIVE                     NUMBER(5,0) DEFAULT 0 NULL,
                    ACHIEVED_BENEFIT_TOTAL_ACTIVE NUMBER DEFAULT 0 NULL,
                    PLANNED_BENEFIT_TOTAL_ACTIVE  NUMBER DEFAULT 0 NULL,
                    ACT_REVENUES_ACT_TOTAL_ACTIVE NUMBER DEFAULT 0 NULL,
                    ACT_REVENUES_REM_TOTAL_ACTIVE NUMBER DEFAULT 0 NULL,
                    ACT_REVENUES_RES_TOTAL_ACTIVE NUMBER DEFAULT 0 NULL,
                    BUDGET_RELEVANT               NUMBER DEFAULT 0 NULL,
                    ERLOESE_GESAMT                NUMBER DEFAULT 0 NULL)
    PCTFREE 10 INITRANS 1 MAXTRANS 255
    STORAGE (INITIAL 64K
             NEXT 1024K
             MINEXTENTS 1
             MAXEXTENTS 2147483645);
CREATE INDEX SIDT090DT091 ON DT091 (STATUSREPORT_ID ASC, PORTFOLIO_ID ASC)
    PCTFREE 10 INITRANS 2 MAXTRANS 255
    STORAGE (INITIAL 64K
             NEXT 1024K
             MINEXTENTS 1
             MAXEXTENTS 2147483645);
CREATE UNIQUE INDEX PID091DT091 ON DT091 (STATUSREPORT_ID ASC, PORTFOLIO_ID ASC, PERIOD_ID ASC)
    PCTFREE 10 INITRANS 2 MAXTRANS 255
    STORAGE (INITIAL 64K
             NEXT 1024K
             MINEXTENTS 1
             MAXEXTENTS 2147483645);

ALTER TABLE DT091 ADD CONSTRAINT UUID_UNIQUE_091 UNIQUE (UUID)
                                                 DEFERRABLE INITIALLY IMMEDIATE
                                                 DISABLE;
ALTER TABLE DT091 ADD CONSTRAINT PID091DT091 PRIMARY KEY (STATUSREPORT_ID,PORTFOLIO_ID,PERIOD_ID)
                                             NOT DEFERRABLE
                                             DISABLE;


--
-- DT092
--

CREATE TABLE DT092 (STATUSREPORT_ID        VARCHAR2(10 CHAR) NOT NULL,
                    PORTFOLIO_ID           VARCHAR2(18 CHAR) NOT NULL,
                    PERIOD_ID              NUMBER(10,0) DEFAULT 0 NOT NULL,
                    KOAGR_ID               VARCHAR2(20 CHAR) NOT NULL,
                    UUID                   RAW(16) DEFAULT SYS_GUID() NULL,
                    OS_CREATED_ON          DATE DEFAULT TO_DATE('01.01.1970','DD.MM.YYYY') NULL,
                    OS_MODIFIED_ON         DATE DEFAULT TO_DATE('01.01.1970','DD.MM.YYYY') NULL,
                    OS_RWDU                NUMBER(5,0) DEFAULT 0 NULL,
                    OS_CREATED_BY          VARCHAR2(20 CHAR) NULL,
                    OS_MODIFIED_BY         VARCHAR2(20 CHAR) NULL,
                    OS_LICENCE             VARCHAR2(4 CHAR) NULL,
                    OS_OPC                 VARCHAR2(8 CHAR) NULL,
                    OS_OWNER               NUMBER(5,0) DEFAULT 0 NULL,
                    OS_GROUP               NUMBER(5,0) DEFAULT 0 NULL,
                    OS_ANY                 NUMBER(5,0) DEFAULT 0 NULL,
                    CTG_NAME               VARCHAR2(80 CHAR) NULL,
                    COST_TYPE_GROUP        VARCHAR2(20 CHAR) NULL,
                    CTG_SORTING            NUMBER(10,0) DEFAULT 0 NULL,
                    CTG_TYPE_CODE          VARCHAR2(2 CHAR) NULL,
                    CTG_TYPE_NAME          VARCHAR2(40 CHAR) NULL,
                    BUDGET_PORTFOLIO_COST  NUMBER DEFAULT 0 NULL,
                    BUDGET_PROJ_TOTAL_COST NUMBER DEFAULT 0 NULL,
                    BUDGET_SUBMITTED_COST  NUMBER DEFAULT 0 NULL,
                    BUDGET_APPROVED_COST   NUMBER DEFAULT 0 NULL,
                    BUDGET_BASELINE_COST   NUMBER DEFAULT 0 NULL,
                    COST_TOTAL_ACTIVE_SR   NUMBER DEFAULT 0 NULL,
                    EFFORT_TOTAL_ACTIVE_SR NUMBER DEFAULT 0 NULL,
                    OBLIGO_COST            NUMBER DEFAULT 0 NULL,
                    BUDGET_PORTFOLIO_EFF   NUMBER DEFAULT 0 NULL,
                    BUDGET_PROJ_TOTAL_EFF  NUMBER DEFAULT 0 NULL,
                    BUDGET_SUBMITTED_EFF   NUMBER DEFAULT 0 NULL,
                    BUDGET_APPROVED_EFF    NUMBER DEFAULT 0 NULL,
                    BUDGET_BASELINE_EFF    NUMBER DEFAULT 0 NULL,
                    COST_PLANNED_TOTAL     NUMBER DEFAULT 0 NULL,
                    COST_ACT_TOTAL         NUMBER DEFAULT 0 NULL,
                    COST_REM_TOTAL         NUMBER DEFAULT 0 NULL,
                    COST_TOTAL_TOTAL       NUMBER DEFAULT 0 NULL,
                    EFFORT_PLANNED_TOTAL   NUMBER DEFAULT 0 NULL,
                    EFFORT_ACT_TOTAL       NUMBER DEFAULT 0 NULL,
                    EFFORT_REM_TOTAL       NUMBER DEFAULT 0 NULL,
                    EFFORT_TOTAL_TOTAL     NUMBER DEFAULT 0 NULL,
                    KOAGR_ACTIVE           NUMBER(5,0) DEFAULT 0 NULL,
                    BUDGET_RELEVANT_EUR    NUMBER DEFAULT 0 NULL,
                    BUDGET_RELEVANT_STD    NUMBER DEFAULT 0 NULL,
                    ABW_RELBUD_PFBUD_EUR   NUMBER DEFAULT 0 NULL,
                    ABW_RELBUD_PFBUD_STD   NUMBER DEFAULT 0 NULL,
                    PCT_ABW_BUDGET_COST    NUMBER DEFAULT 0 NULL,
                    PCT_ABW_BUDGET_TIME    NUMBER DEFAULT 0 NULL)
    PCTFREE 10 INITRANS 1 MAXTRANS 255
    STORAGE (INITIAL 64K
             NEXT 1024K
             MINEXTENTS 1
             MAXEXTENTS 2147483645);
CREATE INDEX SIDT090DT092 ON DT092 (STATUSREPORT_ID ASC, PORTFOLIO_ID ASC)
    PCTFREE 10 INITRANS 2 MAXTRANS 255
    STORAGE (INITIAL 64K
             NEXT 1024K
             MINEXTENTS 1
             MAXEXTENTS 2147483645);
CREATE INDEX SIDT091DT092 ON DT092 (STATUSREPORT_ID ASC, PORTFOLIO_ID ASC, PERIOD_ID ASC)
    PCTFREE 10 INITRANS 2 MAXTRANS 255
    STORAGE (INITIAL 64K
             NEXT 1024K
             MINEXTENTS 1
             MAXEXTENTS 2147483645);
CREATE UNIQUE INDEX PID092DT092 ON DT092 (STATUSREPORT_ID ASC, PORTFOLIO_ID ASC, PERIOD_ID ASC, KOAGR_ID ASC)
    PCTFREE 10 INITRANS 2 MAXTRANS 255
    STORAGE (INITIAL 64K
             NEXT 1024K
             MINEXTENTS 1
             MAXEXTENTS 2147483645);

ALTER TABLE DT092 ADD CONSTRAINT UUID_UNIQUE_092 UNIQUE (UUID)
                                                 DEFERRABLE INITIALLY IMMEDIATE
                                                 DISABLE;
ALTER TABLE DT092 ADD CONSTRAINT PID092DT092 PRIMARY KEY (STATUSREPORT_ID,PORTFOLIO_ID,PERIOD_ID,KOAGR_ID)
                                             NOT DEFERRABLE
                                             DISABLE;
                                             

--
-- DT093
--

CREATE TABLE DT093 (DI062204       VARCHAR2(10 CHAR) NOT NULL,
                    DI062205       VARCHAR2(18 CHAR) NOT NULL,
                    DI062206       VARCHAR2(18 CHAR) NOT NULL,
                    UUID           RAW(16) DEFAULT SYS_GUID() NULL,
                    OS_CREATED_ON  DATE DEFAULT TO_DATE('01.01.1970','DD.MM.YYYY') NULL,
                    OS_MODIFIED_ON DATE DEFAULT TO_DATE('01.01.1970','DD.MM.YYYY') NULL,
                    OS_RWDU        NUMBER(5,0) DEFAULT 0 NULL,
                    OS_CREATED_BY  VARCHAR2(20 CHAR) NULL,
                    OS_MODIFIED_BY VARCHAR2(20 CHAR) NULL,
                    OS_LICENSE     VARCHAR2(4 CHAR) NULL,
                    OS_OPC         VARCHAR2(8 CHAR) NULL,
                    OS_OWNER       NUMBER(5,0) DEFAULT 0 NULL,
                    OS_GROUP       NUMBER(5,0) DEFAULT 0 NULL,
                    OS_ANY         NUMBER(5,0) DEFAULT 0 NULL,
                    DI062207       VARCHAR2(10 CHAR) NULL,
                    DI062622       NUMBER(5,0) DEFAULT 0 NULL,
                    DI062621       NUMBER(5,0) DEFAULT 0 NULL,
                    DI063001       NUMBER(5,0) DEFAULT 0 NULL)
    PCTFREE 10 INITRANS 1 MAXTRANS 255
    STORAGE (INITIAL 64K
             NEXT 1024K
             MINEXTENTS 1
             MAXEXTENTS 2147483645);
CREATE UNIQUE INDEX PID093DT093 ON DT093 (DI062204 ASC, DI062205 ASC, DI062206 ASC)
    PCTFREE 10 INITRANS 2 MAXTRANS 255
    STORAGE (INITIAL 64K
             NEXT 1024K
             MINEXTENTS 1
             MAXEXTENTS 2147483645);

ALTER TABLE DT093 ADD CONSTRAINT UUID_UNIQUE_093 UNIQUE (UUID)
                                                 DEFERRABLE INITIALLY IMMEDIATE
                                                 DISABLE;
ALTER TABLE DT093 ADD CONSTRAINT PID093DT093 PRIMARY KEY (DI062204,DI062205,DI062206)
                                             NOT DEFERRABLE
                                             DISABLE;


--
-- DT094
--

CREATE TABLE DT094 (DI062776 VARCHAR2(10 CHAR) NOT NULL,
                    DI062777 VARCHAR2(18 CHAR) NOT NULL,
                    DI062778 NUMBER(10,0) DEFAULT 0 NOT NULL,
                    UUID     RAW(16) DEFAULT SYS_GUID() NULL,
                    DI062779 DATE DEFAULT TO_DATE('01.01.1970','DD.MM.YYYY') NULL,
                    DI062780 DATE DEFAULT TO_DATE('01.01.1970','DD.MM.YYYY') NULL,
                    DI062781 NUMBER(5,0) DEFAULT 0 NULL,
                    DI062782 VARCHAR2(20 CHAR) NULL,
                    DI062783 VARCHAR2(20 CHAR) NULL,
                    DI062784 VARCHAR2(4 CHAR) NULL,
                    DI062785 VARCHAR2(8 CHAR) NULL,
                    DI062786 NUMBER(5,0) DEFAULT 0 NULL,
                    DI062787 NUMBER(5,0) DEFAULT 0 NULL,
                    DI062788 NUMBER(5,0) DEFAULT 0 NULL,
                    DI062789 VARCHAR2(70 CHAR) NULL,
                    DI062790 NUMBER(10,0) DEFAULT 0 NULL,
                    DI062791 NUMBER(10,0) DEFAULT 0 NULL)
    PCTFREE 10 INITRANS 1 MAXTRANS 255
    STORAGE (INITIAL 64K
             NEXT 1024K
             MINEXTENTS 1
             MAXEXTENTS 2147483645);
CREATE UNIQUE INDEX PID094DT094 ON DT094 (DI062776 ASC, DI062777 ASC, DI062778 ASC)
    PCTFREE 10 INITRANS 2 MAXTRANS 255
    STORAGE (INITIAL 64K
             NEXT 1024K
             MINEXTENTS 1
             MAXEXTENTS 2147483645);

ALTER TABLE DT094 ADD CONSTRAINT PID094DT094 PRIMARY KEY (DI062776,DI062777,DI062778)
                                             NOT DEFERRABLE
                                             DISABLE;
ALTER TABLE DT094 ADD CONSTRAINT UUID_UNIQUE_094 UNIQUE (UUID)
                                                 DEFERRABLE INITIALLY IMMEDIATE
                                                 DISABLE;


--
-- DT280
--

CREATE TABLE DT280 (DI060121 VARCHAR2(20 CHAR) NOT NULL,
                    UUID     RAW(16) DEFAULT SYS_GUID() NULL,
                    DI060122 DATE DEFAULT TO_DATE('01.01.1970','DD.MM.YYYY') NULL,
                    DI060123 DATE DEFAULT TO_DATE('01.01.1970','DD.MM.YYYY') NULL,
                    DI060124 NUMBER(5,0) DEFAULT 0 NULL,
                    DI060125 VARCHAR2(20 CHAR) NULL,
                    DI060126 VARCHAR2(20 CHAR) NULL,
                    DI060127 VARCHAR2(4 CHAR) NULL,
                    DI060128 VARCHAR2(8 CHAR) NULL,
                    DI060129 NUMBER(5,0) DEFAULT 0 NULL,
                    DI060130 NUMBER(5,0) DEFAULT 0 NULL,
                    DI060131 NUMBER(5,0) DEFAULT 0 NULL,
                    DI060132 VARCHAR2(80 CHAR) NULL,
                    DI060133 VARCHAR2(20 CHAR) NULL,
                    DI060134 CLOB NULL,
                    DI060135 NUMBER(5,0) DEFAULT 0 NULL,
                    DI060136 NUMBER(10,0) DEFAULT 0 NULL,
                    DI060467 NUMBER(10,0) DEFAULT 0 NULL)
    PCTFREE 10 INITRANS 1 MAXTRANS 255
    STORAGE (INITIAL 64K
             NEXT 1024K
             MINEXTENTS 1
             MAXEXTENTS 2147483645);
CREATE UNIQUE INDEX PID280DT280 ON DT280 (DI060121 ASC)
    PCTFREE 10 INITRANS 2 MAXTRANS 255
    STORAGE (INITIAL 64K
             NEXT 1024K
             MINEXTENTS 1
             MAXEXTENTS 2147483645);

ALTER TABLE DT280 ADD CONSTRAINT UUID_UNIQUE_280 UNIQUE (UUID)
                                                 DEFERRABLE INITIALLY IMMEDIATE
                                                 DISABLE;
ALTER TABLE DT280 ADD CONSTRAINT PID280DT280 PRIMARY KEY (DI060121)
                                             NOT DEFERRABLE
                                             DISABLE;
                                             

--
-- DT281
--

CREATE TABLE DT281 (DI060139 VARCHAR2(18 CHAR) NOT NULL,
                    DI060140 VARCHAR2(20 CHAR) NOT NULL,
                    UUID     RAW(16) DEFAULT SYS_GUID() NULL,
                    DI060171 VARCHAR2(18 CHAR) NULL,
                    DI060161 DATE DEFAULT TO_DATE('01.01.1970','DD.MM.YYYY') NULL,
                    DI060162 DATE DEFAULT TO_DATE('01.01.1970','DD.MM.YYYY') NULL,
                    DI060163 NUMBER(5,0) DEFAULT 0 NULL,
                    DI060164 VARCHAR2(20 CHAR) NULL,
                    DI060165 VARCHAR2(20 CHAR) NULL,
                    DI060166 VARCHAR2(4 CHAR) NULL,
                    DI060167 VARCHAR2(8 CHAR) NULL,
                    DI060168 NUMBER(5,0) DEFAULT 0 NULL,
                    DI060169 NUMBER(5,0) DEFAULT 0 NULL,
                    DI060170 NUMBER(5,0) DEFAULT 0 NULL,
                    DI060172 VARCHAR2(20 CHAR) NULL,
                    DI060173 VARCHAR2(80 CHAR) NULL,
                    DI060175 NUMBER(10,0) DEFAULT 0 NULL,
                    DI060176 VARCHAR2(2 CHAR) NULL,
                    DI060177 VARCHAR2(40 CHAR) NULL,
                    DI060178 NUMBER DEFAULT 0 NULL,
                    DI060179 NUMBER DEFAULT 0 NULL,
                    DI060180 NUMBER DEFAULT 0 NULL,
                    DI060181 NUMBER DEFAULT 0 NULL,
                    DI060182 NUMBER DEFAULT 0 NULL,
                    DI060183 NUMBER DEFAULT 0 NULL,
                    DI060184 NUMBER DEFAULT 0 NULL,
                    DI060185 NUMBER DEFAULT 0 NULL,
                    DI060186 NUMBER DEFAULT 0 NULL,
                    DI060187 NUMBER DEFAULT 0 NULL,
                    DI060189 NUMBER DEFAULT 0 NULL,
                    DI060190 NUMBER DEFAULT 0 NULL,
                    DI060191 NUMBER DEFAULT 0 NULL,
                    DI060192 NUMBER DEFAULT 0 NULL,
                    DI060193 NUMBER DEFAULT 0 NULL,
                    DI060195 NUMBER DEFAULT 0 NULL,
                    DI060196 NUMBER DEFAULT 0 NULL,
                    DI060197 NUMBER DEFAULT 0 NULL,
                    DI060198 NUMBER DEFAULT 0 NULL,
                    DI060199 NUMBER DEFAULT 0 NULL,
                    DI060240 NUMBER DEFAULT 0 NULL,
                    DI060552 NUMBER DEFAULT 0 NULL,
                    DI060554 NUMBER DEFAULT 0 NULL,
                    DI060553 NUMBER DEFAULT 0 NULL,
                    DI060555 NUMBER DEFAULT 0 NULL,
                    DI060556 NUMBER DEFAULT 0 NULL,
                    DI060557 NUMBER DEFAULT 0 NULL,
                    DI060559 NUMBER DEFAULT 0 NULL,
                    DI060558 NUMBER DEFAULT 0 NULL,
                    DI060188 NUMBER DEFAULT 0 NULL,
                    DI060200 NUMBER DEFAULT 0 NULL,
                    DI060767 NUMBER DEFAULT 0 NULL,
                    DI060768 NUMBER DEFAULT 0 NULL,
                    DI060769 NUMBER DEFAULT 0 NULL,
                    DI060770 NUMBER DEFAULT 0 NULL)
    PCTFREE 10 INITRANS 1 MAXTRANS 255
    STORAGE (INITIAL 64K
             NEXT 1024K
             MINEXTENTS 1
             MAXEXTENTS 2147483645);
CREATE INDEX SIDT461DT281 ON DT281 (DI060171 ASC)
    PCTFREE 10 INITRANS 2 MAXTRANS 255
    STORAGE (INITIAL 64K
             NEXT 1024K
             MINEXTENTS 1
             MAXEXTENTS 2147483645);
CREATE UNIQUE INDEX PID281DT281 ON DT281 (DI060139 ASC, DI060140 ASC)
    PCTFREE 10 INITRANS 2 MAXTRANS 255
    STORAGE (INITIAL 64K
             NEXT 1024K
             MINEXTENTS 1
             MAXEXTENTS 2147483645);

ALTER TABLE DT281 ADD CONSTRAINT UUID_UNIQUE_281 UNIQUE (UUID)
                                                 DEFERRABLE INITIALLY IMMEDIATE
                                                 DISABLE;
ALTER TABLE DT281 ADD CONSTRAINT PID281DT281 PRIMARY KEY (DI060139,DI060140)
                                             NOT DEFERRABLE
                                             DISABLE;

--
-- DT282
--

CREATE TABLE DT282 (DI060470 VARCHAR2(18 CHAR) NOT NULL,
                    DI060472 NUMBER(10,0) DEFAULT 0 NOT NULL,
                    DI060473 VARCHAR2(20 CHAR) NOT NULL,
                    UUID     RAW(16) DEFAULT SYS_GUID() NULL,
                    DI060476 DATE DEFAULT TO_DATE('01.01.1970','DD.MM.YYYY') NULL,
                    DI060477 DATE DEFAULT TO_DATE('01.01.1970','DD.MM.YYYY') NULL,
                    DI060478 NUMBER(5,0) DEFAULT 0 NULL,
                    DI060537 VARCHAR2(20 CHAR) NULL,
                    DI060538 VARCHAR2(20 CHAR) NULL,
                    DI060479 VARCHAR2(4 CHAR) NULL,
                    DI060480 VARCHAR2(8 CHAR) NULL,
                    DI060481 NUMBER(5,0) DEFAULT 0 NULL,
                    DI060482 NUMBER(5,0) DEFAULT 0 NULL,
                    DI060483 NUMBER(5,0) DEFAULT 0 NULL,
                    DI060484 VARCHAR2(20 CHAR) NULL,
                    DI060485 VARCHAR2(80 CHAR) NULL,
                    DI060487 NUMBER(10,0) DEFAULT 0 NULL,
                    DI060488 VARCHAR2(2 CHAR) NULL,
                    DI060490 VARCHAR2(40 CHAR) NULL,
                    DI060491 NUMBER DEFAULT 0 NULL,
                    DI060492 NUMBER DEFAULT 0 NULL,
                    DI060493 NUMBER DEFAULT 0 NULL,
                    DI060494 NUMBER DEFAULT 0 NULL,
                    DI060495 NUMBER DEFAULT 0 NULL,
                    DI060496 NUMBER DEFAULT 0 NULL,
                    DI060497 NUMBER DEFAULT 0 NULL,
                    DI060498 NUMBER DEFAULT 0 NULL,
                    DI060500 NUMBER DEFAULT 0 NULL,
                    DI060501 NUMBER DEFAULT 0 NULL,
                    DI060502 NUMBER DEFAULT 0 NULL,
                    DI060503 NUMBER DEFAULT 0 NULL,
                    DI060504 NUMBER DEFAULT 0 NULL,
                    DI060505 NUMBER DEFAULT 0 NULL,
                    DI060514 NUMBER DEFAULT 0 NULL,
                    DI060513 NUMBER DEFAULT 0 NULL,
                    DI060512 NUMBER DEFAULT 0 NULL,
                    DI060511 NUMBER DEFAULT 0 NULL,
                    DI060510 NUMBER DEFAULT 0 NULL,
                    DI060509 NUMBER DEFAULT 0 NULL,
                    DI060508 NUMBER DEFAULT 0 NULL,
                    DI060507 NUMBER DEFAULT 0 NULL,
                    DI060506 NUMBER DEFAULT 0 NULL,
                    DI060568 NUMBER DEFAULT 0 NULL,
                    DI060584 NUMBER DEFAULT 0 NULL,
                    DI060583 NUMBER DEFAULT 0 NULL,
                    DI060586 NUMBER DEFAULT 0 NULL,
                    DI060585 NUMBER DEFAULT 0 NULL,
                    DI060587 NUMBER DEFAULT 0 NULL,
                    DI060588 NUMBER DEFAULT 0 NULL,
                    DI060589 NUMBER DEFAULT 0 NULL,
                    DI060773 NUMBER DEFAULT 0 NULL,
                    DI060774 NUMBER DEFAULT 0 NULL,
                    DI060771 NUMBER DEFAULT 0 NULL,
                    DI060772 NUMBER DEFAULT 0 NULL,
                    DI061242 NUMBER DEFAULT 0 NULL,
                    DI061243 NUMBER DEFAULT 0 NULL,
                    DI061244 NUMBER DEFAULT 0 NULL,
                    DI061245 NUMBER DEFAULT 0 NULL,
                    DI061367 NUMBER DEFAULT 0 NULL,
                    DI061368 NUMBER DEFAULT 0 NULL,
                    DI061369 NUMBER DEFAULT 0 NULL,
                    DI061370 NUMBER DEFAULT 0 NULL,
                    DI061371 NUMBER DEFAULT 0 NULL,
                    DI061373 NUMBER DEFAULT 0 NULL,
                    DI061374 NUMBER DEFAULT 0 NULL,
                    DI061375 NUMBER DEFAULT 0 NULL,
                    DI061377 NUMBER DEFAULT 0 NULL,
                    DI061378 NUMBER DEFAULT 0 NULL,
                    DI061379 NUMBER DEFAULT 0 NULL,
                    DI061380 NUMBER DEFAULT 0 NULL,
                    DI061381 NUMBER DEFAULT 0 NULL,
                    DI061382 NUMBER DEFAULT 0 NULL,
                    DI061383 NUMBER DEFAULT 0 NULL,
                    DI061384 NUMBER DEFAULT 0 NULL,
                    DI061385 NUMBER DEFAULT 0 NULL,
                    DI060754 NUMBER DEFAULT 0 NULL,
                    DI060755 NUMBER DEFAULT 0 NULL,
                    DI063039 NUMBER DEFAULT 0 NULL,
                    DI063040 NUMBER DEFAULT 0 NULL)
    PCTFREE 10 INITRANS 1 MAXTRANS 255
    STORAGE (INITIAL 64K
             NEXT 1024K
             MINEXTENTS 1
             MAXEXTENTS 2147483645);
CREATE UNIQUE INDEX PID282DT282 ON DT282 (DI060470 ASC, DI060472 ASC, DI060473 ASC)
    PCTFREE 10 INITRANS 2 MAXTRANS 255
    STORAGE (INITIAL 64K
             NEXT 1024K
             MINEXTENTS 1
             MAXEXTENTS 2147483645);

ALTER TABLE DT282 ADD CONSTRAINT UUID_UNIQUE_282 UNIQUE (UUID)
                                                 DEFERRABLE INITIALLY IMMEDIATE
                                                 DISABLE;
ALTER TABLE DT282 ADD CONSTRAINT PID282DT282 PRIMARY KEY (DI060470,DI060472,DI060473)
                                             NOT DEFERRABLE
                                             DISABLE;


--
-- DT283
--

CREATE TABLE DT283 (DI060343 VARCHAR2(18 CHAR) NOT NULL,
                    DI060344 VARCHAR2(20 CHAR) NOT NULL,
                    DI060345 NUMBER(10,0) DEFAULT 0 NOT NULL,
                    UUID     RAW(16) DEFAULT SYS_GUID() NULL,
                    DI060428 VARCHAR2(18 CHAR) NULL,
                    DI060429 NUMBER(10,0) DEFAULT 0 NULL,
                    DI060347 DATE DEFAULT TO_DATE('01.01.1970','DD.MM.YYYY') NULL,
                    DI060348 DATE DEFAULT TO_DATE('01.01.1970','DD.MM.YYYY') NULL,
                    DI060349 NUMBER(5,0) DEFAULT 0 NULL,
                    DI060350 VARCHAR2(20 CHAR) NULL,
                    DI060351 VARCHAR2(20 CHAR) NULL,
                    DI060352 VARCHAR2(4 CHAR) NULL,
                    DI060353 VARCHAR2(8 CHAR) NULL,
                    DI060354 NUMBER(5,0) DEFAULT 0 NULL,
                    DI060355 NUMBER(5,0) DEFAULT 0 NULL,
                    DI060356 NUMBER(5,0) DEFAULT 0 NULL,
                    DI060358 VARCHAR2(80 CHAR) NULL,
                    DI060357 VARCHAR2(20 CHAR) NULL,
                    DI060359 NUMBER(10,0) DEFAULT 0 NULL,
                    DI060360 VARCHAR2(2 CHAR) NULL,
                    DI060361 VARCHAR2(40 CHAR) NULL,
                    DI060362 NUMBER DEFAULT 0 NULL,
                    DI060364 NUMBER DEFAULT 0 NULL,
                    DI060365 NUMBER DEFAULT 0 NULL,
                    DI060366 NUMBER DEFAULT 0 NULL,
                    DI060367 NUMBER DEFAULT 0 NULL,
                    DI060368 NUMBER DEFAULT 0 NULL,
                    DI060369 NUMBER DEFAULT 0 NULL,
                    DI060373 NUMBER DEFAULT 0 NULL,
                    DI060374 NUMBER DEFAULT 0 NULL,
                    DI060377 NUMBER DEFAULT 0 NULL,
                    DI060378 NUMBER DEFAULT 0 NULL,
                    DI060379 NUMBER DEFAULT 0 NULL,
                    DI060380 NUMBER DEFAULT 0 NULL,
                    DI060590 NUMBER DEFAULT 0 NULL,
                    DI060591 NUMBER DEFAULT 0 NULL,
                    DI060592 NUMBER DEFAULT 0 NULL,
                    DI060593 NUMBER DEFAULT 0 NULL,
                    DI060594 NUMBER DEFAULT 0 NULL,
                    DI060595 NUMBER DEFAULT 0 NULL,
                    DI060596 NUMBER DEFAULT 0 NULL,
                    DI060597 NUMBER DEFAULT 0 NULL)
    PCTFREE 10 INITRANS 1 MAXTRANS 255
    STORAGE (INITIAL 64K
             NEXT 1024K
             MINEXTENTS 1
             MAXEXTENTS 2147483645);
CREATE UNIQUE INDEX PID283DT283 ON DT283 (DI060343 ASC, DI060344 ASC, DI060345 ASC)
    PCTFREE 10 INITRANS 2 MAXTRANS 255
    STORAGE (INITIAL 64K
             NEXT 1024K
             MINEXTENTS 1
             MAXEXTENTS 2147483645);

ALTER TABLE DT283 ADD CONSTRAINT UUID_UNIQUE_283 UNIQUE (UUID)
                                                 DEFERRABLE INITIALLY IMMEDIATE
                                                 DISABLE;
ALTER TABLE DT283 ADD CONSTRAINT PID283DT283 PRIMARY KEY (DI060343,DI060344,DI060345)
                                             NOT DEFERRABLE
                                             DISABLE;
                                             

--
-- DT284
--

CREATE TABLE DT284 (DI060297 VARCHAR2(18 CHAR) NOT NULL,
                    DI060300 VARCHAR2(10 CHAR) NOT NULL,
                    DI060299 VARCHAR2(20 CHAR) NOT NULL,
                    UUID     RAW(16) DEFAULT SYS_GUID() NULL,
                    DI060302 DATE DEFAULT TO_DATE('01.01.1970','DD.MM.YYYY') NULL,
                    DI060303 DATE DEFAULT TO_DATE('01.01.1970','DD.MM.YYYY') NULL,
                    DI060304 NUMBER(5,0) DEFAULT 0 NULL,
                    DI060305 VARCHAR2(20 CHAR) NULL,
                    DI060306 VARCHAR2(20 CHAR) NULL,
                    DI060307 VARCHAR2(4 CHAR) NULL,
                    DI060308 VARCHAR2(8 CHAR) NULL,
                    DI060309 NUMBER(5,0) DEFAULT 0 NULL,
                    DI060310 NUMBER(5,0) DEFAULT 0 NULL,
                    DI060311 NUMBER(5,0) DEFAULT 0 NULL,
                    DI060312 VARCHAR2(20 CHAR) NULL,
                    DI060313 VARCHAR2(80 CHAR) NULL,
                    DI060315 NUMBER(10,0) DEFAULT 0 NULL,
                    DI060316 VARCHAR2(2 CHAR) NULL,
                    DI060317 VARCHAR2(40 CHAR) NULL,
                    DI060318 NUMBER DEFAULT 0 NULL,
                    DI060319 NUMBER DEFAULT 0 NULL,
                    DI060322 NUMBER DEFAULT 0 NULL,
                    DI060323 NUMBER DEFAULT 0 NULL,
                    DI060324 NUMBER DEFAULT 0 NULL,
                    DI060325 NUMBER DEFAULT 0 NULL,
                    DI060326 NUMBER DEFAULT 0 NULL,
                    DI060327 NUMBER DEFAULT 0 NULL,
                    DI060328 NUMBER DEFAULT 0 NULL,
                    DI060329 NUMBER DEFAULT 0 NULL,
                    DI060331 NUMBER DEFAULT 0 NULL,
                    DI060332 NUMBER DEFAULT 0 NULL,
                    DI060333 NUMBER DEFAULT 0 NULL,
                    DI060334 NUMBER DEFAULT 0 NULL,
                    DI060335 NUMBER DEFAULT 0 NULL,
                    DI060336 NUMBER DEFAULT 0 NULL,
                    DI060337 NUMBER DEFAULT 0 NULL,
                    DI060338 NUMBER DEFAULT 0 NULL,
                    DI060339 NUMBER DEFAULT 0 NULL,
                    DI060340 NUMBER DEFAULT 0 NULL,
                    DI060341 NUMBER DEFAULT 0 NULL,
                    DI060598 NUMBER DEFAULT 0 NULL,
                    DI060599 NUMBER DEFAULT 0 NULL,
                    DI060600 NUMBER DEFAULT 0 NULL,
                    DI060601 NUMBER DEFAULT 0 NULL,
                    DI060602 NUMBER DEFAULT 0 NULL,
                    DI060603 NUMBER DEFAULT 0 NULL,
                    DI060604 NUMBER DEFAULT 0 NULL,
                    DI060605 NUMBER DEFAULT 0 NULL,
                    DI061257 NUMBER DEFAULT 0 NULL,
                    DI061260 NUMBER DEFAULT 0 NULL,
                    DI061258 NUMBER DEFAULT 0 NULL,
                    DI061261 NUMBER DEFAULT 0 NULL,
                    DI061259 NUMBER DEFAULT 0 NULL,
                    DI061262 NUMBER DEFAULT 0 NULL)
    PCTFREE 10 INITRANS 1 MAXTRANS 255
    STORAGE (INITIAL 64K
             NEXT 1024K
             MINEXTENTS 1
             MAXEXTENTS 2147483645);
CREATE UNIQUE INDEX PID284DT284 ON DT284 (DI060297 ASC, DI060300 ASC, DI060299 ASC)
    PCTFREE 10 INITRANS 2 MAXTRANS 255
    STORAGE (INITIAL 64K
             NEXT 1024K
             MINEXTENTS 1
             MAXEXTENTS 2147483645);

ALTER TABLE DT284 ADD CONSTRAINT UUID_UNIQUE_284 UNIQUE (UUID)
                                                 DEFERRABLE INITIALLY IMMEDIATE
                                                 DISABLE;
ALTER TABLE DT284 ADD CONSTRAINT PID284DT284 PRIMARY KEY (DI060297,DI060300,DI060299)
                                             NOT DEFERRABLE
                                             DISABLE;
                                             

--
-- DT285
--

CREATE TABLE DT285 (DI060386 VARCHAR2(18 CHAR) NOT NULL,
                    DI060387 VARCHAR2(10 CHAR) NOT NULL,
                    DI060388 NUMBER(10,0) DEFAULT 0 NOT NULL,
                    DI060389 VARCHAR2(20 CHAR) NOT NULL,
                    UUID     RAW(16) DEFAULT SYS_GUID() NULL,
                    DI060390 DATE DEFAULT TO_DATE('01.01.1970','DD.MM.YYYY') NULL,
                    DI060391 DATE DEFAULT TO_DATE('01.01.1970','DD.MM.YYYY') NULL,
                    DI060435 NUMBER(5,0) DEFAULT 0 NULL,
                    DI060436 VARCHAR2(20 CHAR) NULL,
                    DI060437 VARCHAR2(20 CHAR) NULL,
                    DI060392 VARCHAR2(4 CHAR) NULL,
                    DI060393 VARCHAR2(8 CHAR) NULL,
                    DI060394 NUMBER(5,0) DEFAULT 0 NULL,
                    DI060666 NUMBER(5,0) DEFAULT 0 NULL,
                    DI060395 NUMBER(5,0) DEFAULT 0 NULL,
                    DI060396 VARCHAR2(20 CHAR) NULL,
                    DI060398 VARCHAR2(80 CHAR) NULL,
                    DI060399 NUMBER(10,0) DEFAULT 0 NULL,
                    DI060400 VARCHAR2(2 CHAR) NULL,
                    DI060401 VARCHAR2(40 CHAR) NULL,
                    DI060402 NUMBER DEFAULT 0 NULL,
                    DI060403 NUMBER DEFAULT 0 NULL,
                    DI060404 NUMBER DEFAULT 0 NULL,
                    DI060405 NUMBER DEFAULT 0 NULL,
                    DI060406 NUMBER DEFAULT 0 NULL,
                    DI060407 NUMBER DEFAULT 0 NULL,
                    DI060408 NUMBER DEFAULT 0 NULL,
                    DI060409 NUMBER DEFAULT 0 NULL,
                    DI060410 NUMBER DEFAULT 0 NULL,
                    DI060411 NUMBER DEFAULT 0 NULL,
                    DI060413 NUMBER DEFAULT 0 NULL,
                    DI060414 NUMBER DEFAULT 0 NULL,
                    DI060415 NUMBER DEFAULT 0 NULL,
                    DI060416 NUMBER DEFAULT 0 NULL,
                    DI060417 NUMBER DEFAULT 0 NULL,
                    DI060418 NUMBER DEFAULT 0 NULL,
                    DI060419 NUMBER DEFAULT 0 NULL,
                    DI060420 NUMBER DEFAULT 0 NULL,
                    DI060421 NUMBER DEFAULT 0 NULL,
                    DI060422 NUMBER DEFAULT 0 NULL,
                    DI060423 NUMBER DEFAULT 0 NULL,
                    DI060606 NUMBER DEFAULT 0 NULL,
                    DI060607 NUMBER DEFAULT 0 NULL,
                    DI060608 NUMBER DEFAULT 0 NULL,
                    DI060609 NUMBER DEFAULT 0 NULL,
                    DI060610 NUMBER DEFAULT 0 NULL,
                    DI060611 NUMBER DEFAULT 0 NULL,
                    DI060613 NUMBER DEFAULT 0 NULL,
                    DI060612 NUMBER DEFAULT 0 NULL,
                    DI061263 NUMBER DEFAULT 0 NULL,
                    DI061266 NUMBER DEFAULT 0 NULL,
                    DI061264 NUMBER DEFAULT 0 NULL,
                    DI061267 NUMBER DEFAULT 0 NULL,
                    DI061265 NUMBER DEFAULT 0 NULL,
                    DI061268 NUMBER DEFAULT 0 NULL)
    PCTFREE 10 INITRANS 1 MAXTRANS 255
    STORAGE (INITIAL 64K
             NEXT 1024K
             MINEXTENTS 1
             MAXEXTENTS 2147483645);
CREATE UNIQUE INDEX PID285DT285 ON DT285 (DI060386 ASC, DI060387 ASC, DI060388 ASC, DI060389 ASC)
    PCTFREE 10 INITRANS 2 MAXTRANS 255
    STORAGE (INITIAL 64K
             NEXT 1024K
             MINEXTENTS 1
             MAXEXTENTS 2147483645);

ALTER TABLE DT285 ADD CONSTRAINT UUID_UNIQUE_285 UNIQUE (UUID)
                                                 DEFERRABLE INITIALLY IMMEDIATE
                                                 DISABLE;
ALTER TABLE DT285 ADD CONSTRAINT PID285DT285 PRIMARY KEY (DI060386,DI060387,DI060388,DI060389)
                                             NOT DEFERRABLE
                                             DISABLE;
                                             

--
-- DT286
--

CREATE TABLE DT286 (DI061324 VARCHAR2(18 CHAR) NOT NULL,
                    DI061325 VARCHAR2(18 CHAR) NOT NULL,
                    DI061326 NUMBER(10,0) DEFAULT 0 NOT NULL,
                    UUID     RAW(16) DEFAULT SYS_GUID() NULL,
                    DI061328 DATE DEFAULT TO_DATE('01.01.1970','DD.MM.YYYY') NULL,
                    DI061329 DATE DEFAULT TO_DATE('01.01.1970','DD.MM.YYYY') NULL,
                    DI061330 NUMBER(5,0) DEFAULT 0 NULL,
                    DI061331 VARCHAR2(20 CHAR) NULL,
                    DI061332 VARCHAR2(20 CHAR) NULL,
                    DI061333 VARCHAR2(4 CHAR) NULL,
                    DI061334 VARCHAR2(8 CHAR) NULL,
                    DI061335 NUMBER(5,0) DEFAULT 0 NULL,
                    DI061336 NUMBER(5,0) DEFAULT 0 NULL,
                    DI061337 NUMBER(5,0) DEFAULT 0 NULL,
                    DI061338 NUMBER(5,0) DEFAULT 0 NULL)
    PCTFREE 10 INITRANS 1 MAXTRANS 255
    STORAGE (INITIAL 64K
             NEXT 1024K
             MINEXTENTS 1
             MAXEXTENTS 2147483645);
CREATE UNIQUE INDEX PID286DT286 ON DT286 (DI061324 ASC, DI061325 ASC, DI061326 ASC)
    PCTFREE 10 INITRANS 2 MAXTRANS 255
    STORAGE (INITIAL 64K
             NEXT 1024K
             MINEXTENTS 1
             MAXEXTENTS 2147483645);

ALTER TABLE DT286 ADD CONSTRAINT UUID_UNIQUE_286 UNIQUE (UUID)
                                                 DEFERRABLE INITIALLY IMMEDIATE
                                                 DISABLE;
ALTER TABLE DT286 ADD CONSTRAINT PID286DT286 PRIMARY KEY (DI061324,DI061325,DI061326)
                                             NOT DEFERRABLE
                                             DISABLE;
                                             

--
-- DT581
--

CREATE TABLE DT581 (UUID          RAW(16) DEFAULT SYS_GUID() NOT NULL,
                    CHART_ID      NUMBER(10,0) DEFAULT 0 NOT NULL,
                    CREATED_ON    DATE DEFAULT TO_DATE('01.01.1970','DD.MM.YYYY') NULL,
                    MODIFIED_ON   DATE DEFAULT TO_DATE('01.01.1970','DD.MM.YYYY') NULL,
                    RWDU          NUMBER(5,0) DEFAULT 0 NULL,
                    CREATED_BY    VARCHAR2(20 CHAR) NULL,
                    MODIFIED_BY   VARCHAR2(20 CHAR) NULL,
                    OWN_LIC       VARCHAR2(4 BYTE) DEFAULT '011' NOT NULL,
                    OPC           VARCHAR2(8 CHAR) NULL,
                    OWNER         NUMBER(5,0) DEFAULT 0 NULL,
                    "GROUP"         NUMBER(5,0) DEFAULT 0 NULL,
                    "ANY"           NUMBER(5,0) DEFAULT 0 NULL,
                    NAME          VARCHAR2(100 CHAR) NULL,
                    CLIENT_CLASS  VARCHAR2(1000 CHAR) NULL,
                    TEMPLATE_NAME VARCHAR2(100 CHAR) NULL)
    PCTFREE 10 INITRANS 1 MAXTRANS 255
    STORAGE (INITIAL 64K
             NEXT 1024K
             MINEXTENTS 1
             MAXEXTENTS 2147483645);
CREATE UNIQUE INDEX PID581DT581 ON DT581 (CHART_ID ASC)
    PCTFREE 10 INITRANS 2 MAXTRANS 255
    STORAGE (INITIAL 64K
             NEXT 1024K
             MINEXTENTS 1
             MAXEXTENTS 2147483645);

ALTER TABLE DT581 ADD CONSTRAINT UUID_UNIQUE_581 UNIQUE (UUID)
                                                 DEFERRABLE INITIALLY IMMEDIATE
                                                 DISABLE;
ALTER TABLE DT581 ADD CONSTRAINT PID581DT581 PRIMARY KEY (CHART_ID)
                                             NOT DEFERRABLE
                                             DISABLE;


--
-- DT581_HIS
--

CREATE TABLE DT581_HIS (UUID          RAW(255) NOT NULL,
                        REV           NUMBER(10,0) NOT NULL,
                        REVTYPE       NUMBER(3,0) NULL,
                        CHART_ID      NUMBER(10,0) NULL,
                        CREATED_ON    DATE NULL,
                        MODIFIED_ON   DATE NULL,
                        RWDU          NUMBER(5,0) NULL,
                        CREATED_BY    VARCHAR2(20 CHAR) NULL,
                        MODIFIED_BY   VARCHAR2(20 CHAR) NULL,
                        OWN_LIC       VARCHAR2(4 CHAR) NULL,
                        OPC           VARCHAR2(8 CHAR) NULL,
                        OWNER         NUMBER(5,0) NULL,
                        "GROUP"         NUMBER(5,0) NULL,
                        "ANY"           NUMBER(5,0) NULL,
                        NAME          VARCHAR2(100 CHAR) NULL,
                        CLIENT_CLASS  VARCHAR2(1000 CHAR) NULL,
                        TEMPLATE_NAME VARCHAR2(100 CHAR) NULL)
    PCTFREE 10 INITRANS 1 MAXTRANS 255
    STORAGE (INITIAL 64K
             NEXT 1024K
             MINEXTENTS 1
             MAXEXTENTS 2147483645);

ALTER TABLE DT581_HIS ADD CONSTRAINT PIDDT581_HIS PRIMARY KEY (UUID,REV)
                                                  NOT DEFERRABLE
                                                  DISABLE;

--
-- DT582
--

CREATE TABLE DT582 (UUID                 RAW(16) DEFAULT SYS_GUID() NOT NULL,
                    AREA_ID              NUMBER(10,0) DEFAULT 0 NOT NULL,
                    CHART_ID             NUMBER(10,0) DEFAULT 0 NOT NULL,
                    CREATED_ON           DATE DEFAULT TO_DATE('01.01.1970','DD.MM.YYYY') NULL,
                    MODIFIED_ON          DATE DEFAULT TO_DATE('01.01.1970','DD.MM.YYYY') NULL,
                    RWDU                 NUMBER(5,0) DEFAULT 0 NULL,
                    CREATED_BY           VARCHAR2(20 CHAR) NULL,
                    MODIFIED_BY          VARCHAR2(20 CHAR) NULL,
                    OWN_LIC              VARCHAR2(4 BYTE) DEFAULT '011' NOT NULL,
                    OPC                  VARCHAR2(8 CHAR) NULL,
                    OWNER                NUMBER(5,0) DEFAULT 0 NULL,
                    "GROUP"                NUMBER(5,0) DEFAULT 0 NULL,
                    "ANY"                  NUMBER(5,0) DEFAULT 0 NULL,
                    SHEET_NAME           VARCHAR2(50 CHAR) NULL,
                    START_FIELD          VARCHAR2(20 CHAR) NULL,
                    MODULE_ID            VARCHAR2(16 CHAR) NULL,
                    DATA_AREA_ID         VARCHAR2(80 CHAR) NULL,
                    TRANSPOSE_DATA       NUMBER(5,0) DEFAULT 0 NULL,
                    ROW_KEY_DATAFIELD    VARCHAR2(80 CHAR) NULL,
                    COLUMN_KEY_DATAFIELD VARCHAR2(80 CHAR) NULL,
                    VALUE_DATAFIELD      VARCHAR2(80 CHAR) NULL,
                    REF_ROW_DATAAREA     VARCHAR2(80 CHAR) NULL,
                    REF_ROW_DATAFIELD    VARCHAR2(80 CHAR) NULL,
                    REF_COL_DATAAREA     VARCHAR2(80 CHAR) NULL,
                    REF_COL_DATAFIELD    VARCHAR2(80 CHAR) NULL)
    PCTFREE 10 INITRANS 1 MAXTRANS 255
    STORAGE (INITIAL 64K
             NEXT 1024K
             MINEXTENTS 1
             MAXEXTENTS 2147483645);
CREATE INDEX SIDT581DT582 ON DT582 (CHART_ID ASC)
    PCTFREE 10 INITRANS 2 MAXTRANS 255
    STORAGE (INITIAL 64K
             NEXT 1024K
             MINEXTENTS 1
             MAXEXTENTS 2147483645);
CREATE UNIQUE INDEX PID582DT582 ON DT582 (AREA_ID ASC, CHART_ID ASC)
    PCTFREE 10 INITRANS 2 MAXTRANS 255
    STORAGE (INITIAL 64K
             NEXT 1024K
             MINEXTENTS 1
             MAXEXTENTS 2147483645);

ALTER TABLE DT582 ADD CONSTRAINT UUID_UNIQUE_582 UNIQUE (UUID)
                                                 DEFERRABLE INITIALLY IMMEDIATE
                                                 DISABLE;
ALTER TABLE DT582 ADD CONSTRAINT PID582DT582 PRIMARY KEY (AREA_ID,CHART_ID)
                                             NOT DEFERRABLE
                                             DISABLE;
                                             

--
-- DT582_HIS
--

CREATE TABLE DT582_HIS (UUID                 RAW(255) NOT NULL,
                        REV                  NUMBER(10,0) NOT NULL,
                        REVTYPE              NUMBER(3,0) NULL,
                        AREA_ID              NUMBER(10,0) NULL,
                        CHART_ID             NUMBER(10,0) NULL,
                        CREATED_ON           DATE NULL,
                        MODIFIED_ON          DATE NULL,
                        RWDU                 NUMBER(5,0) NULL,
                        CREATED_BY           VARCHAR2(20 CHAR) NULL,
                        MODIFIED_BY          VARCHAR2(20 CHAR) NULL,
                        OWN_LIC              VARCHAR2(4 CHAR) NULL,
                        OPC                  VARCHAR2(8 CHAR) NULL,
                        OWNER                NUMBER(5,0) NULL,
                        "GROUP"                NUMBER(5,0) NULL,
                        "ANY"                  NUMBER(5,0) NULL,
                        SHEET_NAME           VARCHAR2(50 CHAR) NULL,
                        START_FIELD          VARCHAR2(20 CHAR) NULL,
                        MODULE_ID            VARCHAR2(16 CHAR) NULL,
                        DATA_AREA_ID         VARCHAR2(80 CHAR) NULL,
                        TRANSPOSE_DATA       NUMBER(5,0) NULL,
                        ROW_KEY_DATAFIELD    VARCHAR2(80 CHAR) NULL,
                        COLUMN_KEY_DATAFIELD VARCHAR2(80 CHAR) NULL,
                        VALUE_DATAFIELD      VARCHAR2(80 CHAR) NULL,
                        REF_ROW_DATAAREA     VARCHAR2(80 CHAR) NULL,
                        REF_ROW_DATAFIELD    VARCHAR2(80 CHAR) NULL,
                        REF_COL_DATAAREA     VARCHAR2(80 CHAR) NULL,
                        REF_COL_DATAFIELD    VARCHAR2(80 CHAR) NULL)
    PCTFREE 10 INITRANS 1 MAXTRANS 255
    STORAGE (INITIAL 64K
             NEXT 1024K
             MINEXTENTS 1
             MAXEXTENTS 2147483645);

ALTER TABLE DT582_HIS ADD CONSTRAINT PIDDT582_HIS PRIMARY KEY (UUID,REV)
                                                  NOT DEFERRABLE
                                                  DISABLE;


--
-- DT883
--

CREATE TABLE DT883 (DI063056 VARCHAR2(18 CHAR) NOT NULL,
                    DI063055 NUMBER(10,0) DEFAULT 0 NOT NULL,
                    DI063058 VARCHAR2(10 CHAR) NOT NULL,
                    UUID     RAW(16) DEFAULT SYS_GUID() NULL,
                    DI063054 VARCHAR2(18 CHAR) NULL,
                    DI063053 DATE DEFAULT TO_DATE('01.01.1970','DD.MM.YYYY') NULL,
                    DI063052 DATE DEFAULT TO_DATE('01.01.1970','DD.MM.YYYY') NULL,
                    DI063051 NUMBER(5,0) DEFAULT 0 NULL,
                    DI063050 VARCHAR2(20 CHAR) NULL,
                    DI063049 VARCHAR2(20 CHAR) NULL,
                    DI063048 VARCHAR2(4 CHAR) NULL,
                    DI063047 VARCHAR2(8 CHAR) NULL,
                    DI063046 NUMBER(5,0) DEFAULT 0 NULL,
                    DI063045 NUMBER(5,0) DEFAULT 0 NULL,
                    DI063044 NUMBER(5,0) DEFAULT 0 NULL,
                    DI063043 CLOB NULL,
                    DI063042 NUMBER(5,0) DEFAULT 0 NULL,
                    DI063140 VARCHAR2(10 CHAR) NULL)
    PCTFREE 10 INITRANS 1 MAXTRANS 255
    STORAGE (INITIAL 64K
             NEXT 1024K
             MINEXTENTS 1
             MAXEXTENTS 2147483645);
CREATE UNIQUE INDEX PID883DT883 ON DT883 (DI063056 ASC, DI063055 ASC, DI063058 ASC)
    PCTFREE 10 INITRANS 2 MAXTRANS 255
    STORAGE (INITIAL 64K
             NEXT 1024K
             MINEXTENTS 1
             MAXEXTENTS 2147483645);

ALTER TABLE DT883 ADD CONSTRAINT PID883DT883 PRIMARY KEY (DI063056,DI063055,DI063058)
                                             NOT DEFERRABLE
                                             DISABLE;
ALTER TABLE DT883 ADD CONSTRAINT UUID_UNIQUE_883 UNIQUE (UUID)
                                                 DEFERRABLE INITIALLY IMMEDIATE
                                                 DISABLE;
                                                 

--
-- TEST_INTERNAL
--

CREATE TABLE TEST_INTERNAL (UUID     RAW(16) DEFAULT SYS_GUID() NOT NULL,
                            DI061591 DATE DEFAULT TO_DATE('01.01.1970','DD.MM.YYYY') NULL,
                            DI061590 DATE DEFAULT TO_DATE('01.01.1970','DD.MM.YYYY') NULL,
                            DI061589 NUMBER(5,0) DEFAULT 0 NULL,
                            DI061588 VARCHAR2(20 CHAR) NULL,
                            DI061587 VARCHAR2(20 CHAR) NULL,
                            DI061586 VARCHAR2(4 CHAR) NULL,
                            DI061585 VARCHAR2(8 CHAR) NULL,
                            DI061584 NUMBER(5,0) DEFAULT 0 NULL,
                            DI061583 NUMBER(5,0) DEFAULT 0 NULL,
                            DI061582 NUMBER(5,0) DEFAULT 0 NULL,
                            DI061592 VARCHAR2(100 CHAR) NULL,
                            DI061593 VARCHAR2(100 CHAR) NULL)
    PCTFREE 10 INITRANS 1 MAXTRANS 255
    STORAGE (INITIAL 64K
             NEXT 1024K
             MINEXTENTS 1
             MAXEXTENTS 2147483645);

ALTER TABLE TEST_INTERNAL ADD CONSTRAINT PID436DT436 PRIMARY KEY (UUID)
                                                     NOT DEFERRABLE
                                                     DISABLE;


--
-- PLANTA_COLUMNS
--

CREATE GLOBAL TEMPORARY TABLE PLANTA_COLUMNS (ID        VARCHAR2(6 BYTE) NOT NULL,
                                              NAME      VARCHAR2(30 BYTE) NULL,
                                              TABLE_ID  VARCHAR2(4 BYTE) NOT NULL,
                                              DB_POS    NUMBER(5,0) NOT NULL,
                                              SQL_FLAGS NUMBER(5,0) NOT NULL) ON COMMIT PRESERVE ROWS;
CREATE UNIQUE INDEX PL_COL_PK ON PLANTA_COLUMNS (ID ASC);
CREATE INDEX PLANTA_COLUMNS_BY_NAME ON PLANTA_COLUMNS (TABLE_ID ASC, NAME ASC);
CREATE INDEX PLANTA_COLUMNS_NAME ON PLANTA_COLUMNS (NAME ASC);
CREATE INDEX PLANTA_COLUMNS_SQL ON PLANTA_COLUMNS (SQL_FLAGS ASC);
CREATE INDEX PLANTA_COLUMNS_DBPOS ON PLANTA_COLUMNS (DB_POS ASC);
CREATE INDEX PLANTA_COLUMNS_TABLE_ID ON PLANTA_COLUMNS (TABLE_ID ASC);

ALTER TABLE PLANTA_COLUMNS ADD CONSTRAINT PL_COL_PK PRIMARY KEY (ID)
                                                    NOT DEFERRABLE
                                                    DISABLE;


--
-- PLANTA_RELATIONS
--

CREATE GLOBAL TEMPORARY TABLE PLANTA_RELATIONS (TABLE_ID     VARCHAR2(4 BYTE) NOT NULL,
                                                R_TABLE_ID   VARCHAR2(4 BYTE) NOT NULL,
                                                RELATION     VARCHAR2(4 BYTE) NOT NULL,
                                                RECURSION    NUMBER(5,0) NOT NULL,
                                                NAME         VARCHAR2(16 BYTE) NULL,
                                                FIRST_KEY_DI VARCHAR2(6 BYTE) NOT NULL,
                                                LAST_KEY_DI  VARCHAR2(6 BYTE) NOT NULL,
                                                FIRST_DB_POS NUMBER(5,0) NOT NULL,
                                                LAST_DB_POS  NUMBER(5,0) NOT NULL) ON COMMIT PRESERVE ROWS;
CREATE UNIQUE INDEX PL_REL_PK ON PLANTA_RELATIONS (TABLE_ID ASC, R_TABLE_ID ASC, FIRST_KEY_DI ASC);

ALTER TABLE PLANTA_RELATIONS ADD CONSTRAINT PL_REL_PK PRIMARY KEY (TABLE_ID,R_TABLE_ID,FIRST_KEY_DI)
                                                      NOT DEFERRABLE
                                                      DISABLE;


--
-- PLANTA_TABLES
--

CREATE GLOBAL TEMPORARY TABLE PLANTA_TABLES (ID        VARCHAR2(4 BYTE) NOT NULL,
                                             NAME      VARCHAR2(30 BYTE) NOT NULL,
                                             HAS_DUMMY NUMBER(5,0) NOT NULL) ON COMMIT PRESERVE ROWS;
CREATE UNIQUE INDEX PL_TABLE_PK ON PLANTA_TABLES (ID ASC);
CREATE UNIQUE INDEX PLANTA_TABLES_BY_NAME ON PLANTA_TABLES (NAME ASC);

ALTER TABLE PLANTA_TABLES ADD CONSTRAINT PL_TABLE_PK PRIMARY KEY (ID)
                                                     NOT DEFERRABLE
                                                     DISABLE;
