-- Add/modify columns 
alter table I_PRODUCT add USEGRADECATEGORYDEFECT varchar2(1) default 'N' not null;
alter table I_PRODUCT add DEFAULTRETURNGRADECODE varchar2(1);
alter table I_PRODUCT add MOUNTINGPRODUCT varchar2(1) default 'N' not null;
alter table I_PRODUCT add SHOWONMOUNTINGORDER varchar2(1) default 'N' not null;
alter table I_PRODUCT add SHOWONDISMOUNTINGORDER varchar2(1) default 'N' not null;
alter table I_PRODUCT add SHOWONPICKLISTRSC varchar2(1) default 'N' not null;
-- Add comments to the columns 
comment on column I_PRODUCT.UseGradeCategoryDefect
  is 'Product can be identified with a grade connected to category ‘Defect’';
comment on column I_PRODUCT.DefaultReturnGradeCODE
  is 'Return Quality Grade';
comment on column I_PRODUCT.MountingProduct
  is 'Product is a mounting product Y/N';
comment on column I_PRODUCT.ShowOnMountingOrder
  is 'Product may be added to a Mounting Order Y/N';
comment on column I_PRODUCT.ShowOnDisMountingOrder
  is 'Product may be added to a Dismounting Order Y/N';
comment on column I_PRODUCT.ShowOnPicklistRsc
  is 'Product will be displayed on a Route Status Control Pick List Y/N';
-- Create/Recreate check constraints 
alter table I_PRODUCT
  add constraint I_PROD_USEGRADECATEGORYDEFECT
  check (USEGRADECATEGORYDEFECT IN ('Y','N'));
alter table I_PRODUCT
  add constraint I_PROD_MOUNTINGPRODUCT
  check (MOUNTINGPRODUCT IN ('Y','N'));
alter table I_PRODUCT
  add constraint I_PROD_SHOWONMOUNTINGORDER
  check (SHOWONMOUNTINGORDER IN ('Y','N'));
alter table I_PRODUCT
  add constraint I_PROD_SHOWONDISMOUNTINGORDER
  check (SHOWONDISMOUNTINGORDER IN ('Y','N'));
alter table I_PRODUCT
  add constraint I_PROD_SHOWONPICKLISTRSC
  check (SHOWONPICKLISTRSC IN ('Y','N'));  
alter table I_PRODUCT
  add constraint I_PROD_DEFAULTRETURNGRADECODE
  check (DEFAULTRETURNGRADECODE = UPPER(DEFAULTRETURNGRADECODE)); 