-- order 502756 (new Lotus Notes order: 20010591.80)


-- Add comments to the columns 
comment on column EMAILSETTING.DOCUMENTTYPE
  is '1 = Invoice
      2 = Statement
      3 = Purchase order
      4 = E-service password reminder
      5 = Work order via web
      6 = Invoice job checklist
      7 = Customer
      8 = Log Message
     10 = Stock Count / Order';


-- Add comments to the columns 
comment on column INTERNETORDER.STATUS
  is '1 = Not Counted
      2 = Counted
      3 = Confirmed
      4 = Packing in Progress';


ALTER TABLE INTERNETORDER ADD ( WEBUSER_ID    NUMBER NULL );


ALTER TABLE INTERNETORDERLINE DROP CONSTRAINT INTERNETORDERLINE_DELIVERYVARI;


ALTER TABLE INTERNETORDERLINE
  ADD CONSTRAINT INTERNETORDERLINE_DELIVERYVARI
      FOREIGN KEY (DELIVERYVARIATIONS_ID)
      REFERENCES DELIVERYVARIATIONS (DELIVERYVARIATIONS_ID) 
      ON DELETE SET NULL;
