alter table HISTOGRAMS drop constraint FK9096178FDBFCB7FC;
alter table RI_DATASET drop constraint FK946ACA509ED02E0C;
alter table RI_DATASET drop constraint FK946ACA5087DA7C85;
alter table TASK drop constraint FK272D855ACB66C5;
alter table DSINSTANCE drop constraint FK456E8E2490C01319;
alter table DSINSTANCE drop constraint FK456E8E249ED02E0C;
alter table SYSTEM_TESTS drop constraint FKAC2C7FF1E2D4894F;
alter table DATASET drop constraint FK80D14058CF2B95BF;
alter table DATASET drop constraint FK80D14058821EC7B;
alter table DATASET drop constraint FK80D1405834D56AFF;
alter table RI_TASK drop constraint FK73B2A68DCF2B95BF;
alter table RI_TASK drop constraint FK73B2A68D87DA7C85;
alter table RECORDINFO drop constraint FK48C12C7FA6E94FBC;
alter table RI_TASKPROCESS drop constraint FKB284FB22FFB837FA;
alter table RI_TASKPROCESS drop constraint FKB284FB2287DA7C85;
alter table TPI_DSI drop constraint FKE8400FA8188AD;
alter table TPI_DSI drop constraint FKE8400FA8AD8BF4B3;
alter table RUN drop constraint FK13E6BCF2B95BF;
alter table TASKPROCESS drop constraint FK7B312D2ACF2B95BF;
alter table TP_DS drop constraint FK4C581329ED02E0C;
alter table TP_DS drop constraint FK4C58132FFB837FA;
alter table USER_ROLE drop constraint FKBC16F46A188AD;
alter table USER_ROLE drop constraint FKBC16F46AA6E94FBC;
alter table TPINSTANCE drop constraint FKCD385311FFB837FA;
alter table TPINSTANCE drop constraint FKCD38531190C01319;
alter table CATEGORIES drop constraint FK6A31321C217F38D0;
drop table HISTOGRAMS cascade constraints;
drop table RI_DATASET cascade constraints;
drop table TASK cascade constraints;
drop table DSFILETYPE cascade constraints;
drop table DSINSTANCE cascade constraints;
drop table SYSTEM_TESTS cascade constraints;
drop table DATASET cascade constraints;
drop table RI_TASK cascade constraints;
drop table RECORDINFO cascade constraints;
drop table RI_TASKPROCESS cascade constraints;
drop table TPI_DSI cascade constraints;
drop table PROCESSINGSTATUS cascade constraints;
drop table RUN cascade constraints;
drop table TASKPROCESS cascade constraints;
drop table TP_DS cascade constraints;
drop table TASKTYPE cascade constraints;
drop table USER_ROLE cascade constraints;
drop table TPINSTANCE cascade constraints;
drop table GLASTUSER cascade constraints;
drop table CATEGORIES cascade constraints;
drop table RELEASE_TESTS cascade constraints;
drop table DSTYPE cascade constraints;
drop table ROLE cascade constraints;
drop sequence hibernate_sequence;
create table HISTOGRAMS (
   ID NUMBER(19,0) not null,
   NAME VARCHAR2(255),
   DESCRIPTION VARCHAR2(2000),
   CATEGORY_ID NUMBER(19,0),
   primary key (ID)
);
create table RI_DATASET (
   DATASET_FK NUMBER(19,0) not null,
   RECORDINFO_FK NUMBER(19,0) not null,
   primary key (DATASET_FK, RECORDINFO_FK)
);
create table TASK (
   TASK_PK NUMBER(19,0) not null,
   TASKTYPE_FK NUMBER(19,0) not null,
   TASKNAME VARCHAR2(20) not null,
   primary key (TASK_PK)
);
create table DSFILETYPE (
   DSFILETYPE_PK NUMBER(19,0) not null,
   DSFILETYPENAME VARCHAR2(10) not null,
   primary key (DSFILETYPE_PK)
);
create table DSINSTANCE (
   DSINSTANCE_PK NUMBER(19,0) not null,
   FILEPATH VARCHAR2(120) not null,
   FILENAME VARCHAR2(50) not null,
   DATASET_FK NUMBER(19,0) not null,
   RUN_FK NUMBER(19,0) not null,
   BYTES NUMBER(19,0),
   ARCHIVED VARCHAR2(1),
   primary key (DSINSTANCE_PK)
);
create table SYSTEM_TESTS (
   SYSTEST_ID NUMBER(19,0) not null,
   TEST_NAME VARCHAR2(30) not null,
   VERSION VARCHAR2(10) not null,
   REVISION VARCHAR2(2) not null,
   TEST_TYPE VARCHAR2(25) not null,
   RELTEST_ID NUMBER(19,0) not null,
   TEST_RESULT VARCHAR2(50),
   HISTOGRAM_FILE VARCHAR2(200),
   primary key (SYSTEST_ID)
);
create table DATASET (
   DATASET_PK NUMBER(19,0) not null,
   TASK_FK NUMBER(19,0) not null,
   DATASETNAME VARCHAR2(20) not null,
   DSTYPE_FK NUMBER(19,0) not null,
   DSFILETYPE_FK NUMBER(19,0) not null,
   primary key (DATASET_PK)
);
create table RI_TASK (
   TASK_FK NUMBER(19,0) not null,
   RECORDINFO_FK NUMBER(19,0) not null,
   primary key (TASK_FK, RECORDINFO_FK)
);
create table RECORDINFO (
   RECORDINFO_PK NUMBER(19,0) not null,
   NOTATION VARCHAR2(200) not null,
   ENTERED DATE not null,
   GLASTUSER_FK NUMBER(19,0) not null,
   primary key (RECORDINFO_PK)
);
create table RI_TASKPROCESS (
   TASKPROCESS_FK NUMBER(19,0) not null,
   RECORDINFO_FK NUMBER(19,0) not null,
   primary key (TASKPROCESS_FK, RECORDINFO_FK)
);
create table TPI_DSI (
   TPINSTANCE_FK NUMBER(19,0) not null,
   elt NUMBER(19,0) not null,
   primary key (TPINSTANCE_FK, elt)
);
create table PROCESSINGSTATUS (
   PROCESSINGSTATUS_PK NUMBER(19,0) not null,
   PROCESSINGSTATUSNAME VARCHAR2(20) not null,
   primary key (PROCESSINGSTATUS_PK)
);
create table RUN (
   RUN_PK NUMBER(19,0) not null,
   TASK_FK NUMBER(19,0) not null,
   RUNNAME VARCHAR2(40) not null,
   primary key (RUN_PK)
);
create table TASKPROCESS (
   TASKPROCESS_PK NUMBER(19,0) not null,
   TASK_FK NUMBER(19,0) not null,
   TASKPROCESSNAME VARCHAR2(20) not null,
   SEQUENCE NUMBER(19,0) not null,
   APPNAME VARCHAR2(20) not null,
   APPVERSION VARCHAR2(20) not null,
   primary key (TASKPROCESS_PK)
);
create table TP_DS (
   TASKPROCESS_FK NUMBER(19,0) not null,
   DATASET_FK NUMBER(19,0) not null,
   primary key (TASKPROCESS_FK, DATASET_FK)
);
create table TASKTYPE (
   TASKTYPE_PK NUMBER(19,0) not null,
   TASKTYPENAME VARCHAR2(20) not null,
   primary key (TASKTYPE_PK)
);
create table USER_ROLE (
   ROLE_FK NUMBER(19,0) not null,
   elt NUMBER(19,0) not null,
   GLASTUSER_FK NUMBER(19,0) not null,
   primary key (GLASTUSER_FK, elt)
);
create table TPINSTANCE (
   TPINSTANCE_PK NUMBER(19,0) not null,
   TASKPROCESS_FK NUMBER(19,0) not null,
   RUN_FK NUMBER(19,0) not null,
   primary key (TPINSTANCE_PK)
);
create table GLASTUSER (
   GLASTUSER_PK NUMBER(19,0) not null,
   GLASTUSERNAME VARCHAR2(20) not null,
   PASSWORD VARCHAR2(20) not null,
   primary key (GLASTUSER_PK)
);
create table CATEGORIES (
   ID NUMBER(19,0) not null,
   NAME VARCHAR2(255),
   PARENT_ID NUMBER(19,0),
   primary key (ID)
);
create table RELEASE_TESTS (
   RELTEST_ID NUMBER(19,0) not null,
   PKG_NAME VARCHAR2(25) not null,
   VERSION VARCHAR2(10),
   primary key (RELTEST_ID)
);
create table DSTYPE (
   DSTYPE_PK NUMBER(19,0) not null,
   DSTYPENAME VARCHAR2(10) not null,
   primary key (DSTYPE_PK)
);
create table ROLE (
   ROLE_PK NUMBER(19,0) not null,
   ROLENAME VARCHAR2(20) not null,
   primary key (ROLE_PK)
);
alter table HISTOGRAMS add constraint FK9096178FDBFCB7FC foreign key (CATEGORY_ID) references CATEGORIES;
alter table RI_DATASET add constraint FK946ACA509ED02E0C foreign key (DATASET_FK) references DATASET;
alter table RI_DATASET add constraint FK946ACA5087DA7C85 foreign key (RECORDINFO_FK) references RECORDINFO;
alter table TASK add constraint FK272D855ACB66C5 foreign key (TASKTYPE_FK) references TASKTYPE;
alter table DSINSTANCE add constraint FK456E8E2490C01319 foreign key (RUN_FK) references RUN;
alter table DSINSTANCE add constraint FK456E8E249ED02E0C foreign key (DATASET_FK) references DATASET;
alter table SYSTEM_TESTS add constraint FKAC2C7FF1E2D4894F foreign key (RELTEST_ID) references RELEASE_TESTS;
alter table DATASET add constraint FK80D14058CF2B95BF foreign key (TASK_FK) references TASK;
alter table DATASET add constraint FK80D14058821EC7B foreign key (DSTYPE_FK) references DSTYPE;
alter table DATASET add constraint FK80D1405834D56AFF foreign key (DSFILETYPE_FK) references DSFILETYPE;
alter table RI_TASK add constraint FK73B2A68DCF2B95BF foreign key (TASK_FK) references TASK;
alter table RI_TASK add constraint FK73B2A68D87DA7C85 foreign key (RECORDINFO_FK) references RECORDINFO;
alter table RECORDINFO add constraint FK48C12C7FA6E94FBC foreign key (GLASTUSER_FK) references GLASTUSER;
alter table RI_TASKPROCESS add constraint FKB284FB22FFB837FA foreign key (TASKPROCESS_FK) references TASKPROCESS;
alter table RI_TASKPROCESS add constraint FKB284FB2287DA7C85 foreign key (RECORDINFO_FK) references RECORDINFO;
alter table TPI_DSI add constraint FKE8400FA8188AD foreign key (elt) references DSINSTANCE;
alter table TPI_DSI add constraint FKE8400FA8AD8BF4B3 foreign key (TPINSTANCE_FK) references TPINSTANCE;
alter table RUN add constraint FK13E6BCF2B95BF foreign key (TASK_FK) references TASK;
alter table TASKPROCESS add constraint FK7B312D2ACF2B95BF foreign key (TASK_FK) references TASK;
alter table TP_DS add constraint FK4C581329ED02E0C foreign key (DATASET_FK) references DATASET;
alter table TP_DS add constraint FK4C58132FFB837FA foreign key (TASKPROCESS_FK) references TASKPROCESS;
alter table USER_ROLE add constraint FKBC16F46A188AD foreign key (elt) references ROLE;
alter table USER_ROLE add constraint FKBC16F46AA6E94FBC foreign key (GLASTUSER_FK) references GLASTUSER;
alter table TPINSTANCE add constraint FKCD385311FFB837FA foreign key (TASKPROCESS_FK) references TASKPROCESS;
alter table TPINSTANCE add constraint FKCD38531190C01319 foreign key (RUN_FK) references RUN;
alter table CATEGORIES add constraint FK6A31321C217F38D0 foreign key (PARENT_ID) references CATEGORIES;
create sequence hibernate_sequence;
  • No labels