--I-TABLE CHANGES ORDER 502807

-- Add comments to the columns 
comment on column I_CUSTOMER.GARMENTINSURANCE
  is '0= Garment Insurance Not Applicable,
1= For Repairs
2= For Loss charges
3= For Repairs and Loss charges
4= For Residual Value
5= For Repair and Residual Value
6= For Residual Value and Loss Charge
7= For Repair Loss Charge and Residual Value';

-- Create/Recreate check constraints 
alter table I_CUSTOMER
  drop constraint ANNIVERSARYPRICEADJ_VALIDATION;
alter table I_CUSTOMER
  add constraint ANNIVERSARYPRICEADJ_VALIDATION
  check (anniversarypriceadj IN (1,2,3,4));
alter table I_CUSTOMER
  drop constraint GARMENTINSURANCE_VALIDATION;
alter table I_CUSTOMER
  add constraint GARMENTINSURANCE_VALIDATION
  check (garmentinsurance BETWEEN 0 AND 7);

--Add new fields  
alter table I_PRODUCT add DEFAULTSTOCKROOM VARCHAR2(12);
alter table I_PRODUCT add FIXEDSTOCKROOM varchar2(1) default 'N' not null;
alter table I_PRODUCTLISTPERCUSTOMER add DEFAULTSTOCKROOM VARCHAR2(12);
alter table I_PRODUCTLISTPERCUSTOMER add FIXEDSTOCKROOM varchar2(1) default 'N' not null;