--ABS-144163

--ACCESSRIGHTSVIOLATION TABLE
CREATE SEQUENCE SEQ_ACCESSRIGHTSVIOLATION
START WITH 1 
INCREMENT BY 1;

CREATE TABLE ACCESSRIGHTSVIOLATION(
      ACCESSRIGHTSVIOLATION_ID NUMBER NOT NULL,
      PLANT_ID                 NUMBER NOT NULL,
      DIALOG_ID                NUMBER NOT NULL,
      TARGET                   VARCHAR2(100) NOT NULL,
      SIGNATURE                VARCHAR2(1000) NOT NULL,
      ARGUMENTS                VARCHAR2(4000) NOT NULL,
      DIALOGINFO               VARCHAR2(100), 
      DIALOGSOPENINREADONLY    VARCHAR2(1000),
      USERGROUP_ID             NUMBER NOT NULL,
      TIMESTAMP                DATE NOT NULL,
      SYSTEMUSER_ID            NUMBER NOT NULL);

ALTER TABLE ACCESSRIGHTSVIOLATION
   ADD CONSTRAINT XPKACCESSRIGHTSVIOLATION PRIMARY KEY (ACCESSRIGHTSVIOLATION_ID);

CREATE INDEX XIF1ACCESSRIGHTSVIOLATION ON ACCESSRIGHTSVIOLATION (PLANT_ID);

ALTER TABLE ACCESSRIGHTSVIOLATION
   ADD CONSTRAINT FK_ACCESSRIGHTSVIOLATION_PLANT_ID FOREIGN KEY (PLANT_ID) REFERENCES PLANT (PLANT_ID);
