-- ABS-133891 / ABS-139572

------------ ROUTECONTROLAD ------------

CREATE TABLE ROUTECONTROLAD
(ROUTECONTROL_ID NUMBER NOT NULL,
AD_USERNAME VARCHAR2(20) NULL,
AD_TIMESTAMP DATE NULL,
NOTES VARCHAR2(2000) NULL,
REVIEW VARCHAR2(1) DEFAULT 'N' NOT NULL,
SYSTEMUSER_ID NUMBER NOT NULL,
TIMESTAMP DATE DEFAULT SYSDATE NOT NULL
);



ALTER TABLE ROUTECONTROLAD
  ADD CONSTRAINT XPKROUTECONTROLAD PRIMARY KEY (ROUTECONTROL_ID);
  
  
ALTER TABLE ROUTECONTROLAD
  ADD CONSTRAINT FK_ROUTECONTROLAD_ROUTECONTROL_ID FOREIGN KEY (ROUTECONTROL_ID) REFERENCES ROUTECONTROL (ROUTECONTROL_ID) ON DELETE CASCADE;
