--Order 20011552.60

ALTER TABLE ROUTECHANGETRANSACTION
DROP CONSTRAINT ROUTECHANGETRANSACTION_DELIVD;




ALTER TABLE ROUTECHANGETRANSACTION
  DROP COLUMN DELIVERYDAY_ID CASCADE CONSTRAINTS;



ALTER TABLE ROUTECHANGETRANSACTION
	ADD (OLDROUTELASTDRIVINGDATE DATE NULL);



COMMENT ON COLUMN ROUTECHANGETRANSACTION.OLDROUTELASTDRIVINGDATE IS 'Last driving date for the old routestop.';



ALTER TABLE ROUTESTOP
	ADD (MOVEDROUTESTOP_ID NUMBER);



CREATE  INDEX XIF7ROUTESTOP ON ROUTESTOP
(MOVEDROUTESTOP_ID   ASC) TABLESPACE INDX;



ALTER TABLE ROUTESTOP
ADD CONSTRAINT ROUTESTOP_ROUTESTOP FOREIGN KEY (MOVEDROUTESTOP_ID) REFERENCES ROUTESTOP (ROUTESTOP_ID) ON DELETE SET NULL;


--Order 20011553.90


ALTER TABLE CUSTOMERDELIVERYSCHEME
	ADD (ACTIVE VARCHAR2(1)  DEFAULT 'Y' NOT NULL CONSTRAINT YN_ValidationField48 CHECK (ACTIVE IN ('Y', 'N')));



insert into process(process_id,description,active) values ('102','Inactivate Customer Delivery Schemes','Y');
  


