--order 502228

ALTER TABLE COSTCENTER RENAME COLUMN EXPORTED TO EXPORTEDI;

--502045 itest 


alter table ABSLOGPROCESSJOB  drop constraint ABSLOGPROCESSJOB_PLANTPROCESS_ ;
 
alter table ABSLOGPROCESSJOB add constraint ABSLOGPROCESSJOB_PLANTPROCESS_ foreign key (PLANTPROCESS_ID) references PLANTPROCESS (PLANTPROCESS_ID) on delete set null;

--PVD

-- add columns
alter table I_DELIVERYSTANDARDS add QTYFREEOFCHARGE number default 0;
alter table I_PRODUCT add TURNOVERGROUPLOSS VARCHAR2(12);
alter table I_PRODUCT add TURNOVERGROUPADVANCE VARCHAR2(12);
alter table I_PRODUCT add TURNOVERGROUPCORRECTIONS VARCHAR2(12);
alter table I_PRODUCT add TURNOVERGROUPWASHCOG VARCHAR2(12);

-- modify columns 
alter table STOCKROOMLOCATION modify LOCATIONTYPE_ID default 1;
alter table RENTALQTYADJUSTMENT modify QUALITYGRADE_ID default 1;

-- Recreate check constraints 
alter table I_PRICELIST
  drop constraint PRICETYPE_VAL_RENTPRICETYPE;
alter table I_PRICELIST
  add constraint PRICETYPE_VAL_RENTPRICETYPE
  check (PRICELISTTYPE <> 2 or (RENTPRICETYPE BETWEEN 1 AND 8 AND PRICELISTTYPE = 2));