-- order 502880 (new Lotus Notes order: 20010616.20)

ALTER TABLE WEEKSTATISTICS MODIFY COSTCENTER_LINK_ID NULL;

ALTER TABLE WEEKSTATISTICS MODIFY ACTIVITY_ID NULL;
ALTER TABLE WEEKSTATISTICS MODIFY PRODUCT_LINK_ID NULL;
ALTER TABLE WEEKSTATISTICS MODIFY SIZEDEFINITION_LINK_ID NULL;
ALTER TABLE WEEKSTATISTICS MODIFY FINISHINGMETHOD_ID NULL;

ALTER TABLE WEEKSTATISTICS ADD (WEIGHINGCATEGORY_ID NUMBER NULL);

ALTER TABLE WEEKSTATISTICS
       ADD  ( CONSTRAINT WEEKSTATISTICS_WEIGHINGCATEG
              FOREIGN KEY (WEIGHINGCATEGORY_ID)
                             REFERENCES WEIGHINGCATEGORY) ; 

CREATE INDEX XIF13WEEKSTATISTICS ON WEEKSTATISTICS
(
       WEIGHINGCATEGORY_ID               ASC
);