/*order 502358*/      
      /*
      CHANGE REPORT for Table PURCHASEORDERHEADER
          - Changing column definition of ORDERTYPE
          - Changing column definition of ORIGIN
      ACTION is ALTER or modify Table PURCHASEORDERHEADER
      */

COMMENT ON COLUMN PURCHASEORDERHEADER.ORDERTYPE IS 'Ameripride values are:
0 = Manual / no AC / not applicable
1 = Personalized order
2 = Standard order';


COMMENT ON COLUMN PURCHASEORDERHEADER.ORIGIN IS '1 = Purchase request
2 = Manual created
3 = Conversion
4 = Work order approval';

--table PLANTPRODUCTSETTINGS

ALTER TABLE PLANTPRODUCTSETTINGS DROP CONSTRAINT PLANTPRODUCTSETTINGS_PLANT_ID;


ALTER TABLE PLANTPRODUCTSETTINGS DROP CONSTRAINT 
    PLANTPRODUCTSETTINGS_PRODUCT_I;

      
      /*
      CHANGE REPORT for Table PLANTPRODUCTSETTINGS
          - Changing definition of relation PLANTPRODUCTSETTINGS_PLANT_ID
          - Changing definition of relation PLANTPRODUCTSETTINGS_PRODUCT_I
          - Adding column FULFILLMENTGROUP
      ACTION is ALTER or modify Table PLANTPRODUCTSETTINGS
      */

ALTER TABLE PLANTPRODUCTSETTINGS ADD (FULFILLMENTGROUP     NUMBER(1) NULL);

COMMENT ON COLUMN PLANTPRODUCTSETTINGS.FULFILLMENTGROUP IS '1 = Garments are stocked at the Apparel Center and the Apparel Center is the exclusive supplier for the plant 
3 = Not stocked at the Apparel Center , however if the item requires embroidery or prep work , for new and renew contracts at the Apparel Center 
4 = Never handled by the Apparel Center';

ALTER TABLE PLANTPRODUCTSETTINGS
       ADD  ( CONSTRAINT PLANTPRODUCTSETTINGS_PLANT_ID
              FOREIGN KEY (PLANT_ID)
                             REFERENCES PLANT
                             ON DELETE CASCADE ) ;


ALTER TABLE PLANTPRODUCTSETTINGS
       ADD  ( CONSTRAINT PLANTPRODUCTSETTINGS_PRODUCT_I
              FOREIGN KEY (PRODUCT_ID)
                             REFERENCES PRODUCT
                             ON DELETE CASCADE ) ;