--todo 10020

-- Add/modify columns 
alter table GROWTHHISTORY add OLDPRICE NUMBER(15,4);
alter table GROWTHHISTORY add NEWPRICE NUMBER(15,4);
alter table GROWTHHISTORY add FREQUENCY number;
alter table GROWTHHISTORY add MINIMUMPERCENTAGE number;

-- Add comments to the columns 
comment on column GROWTHHISTORY.OLDPRICE
  is 'only populated for transaction type price increase / price decrease';
comment on column GROWTHHISTORY.NEWPRICE
  is 'only populated for transaction type price increase / price decrease';
comment on column GROWTHHISTORY.FREQUENCY
  is '0.25=once every 4 weeks, 0.5=every other week,1=weekly, 2=twice a week, 3=three times a week, etc';
comment on column GROWTHHISTORY.MINIMUMPERCENTAGE
  is 'only populated for billingmethod 2';

-- Create/Recreate indexes 
CREATE INDEX XIF1GROWTHHISTORY ON GROWTHHISTORY 
(  TRANSACTIONDATE,
  BUSINESSUNIT_ID
);

CREATE INDEX XIF2GROWTHHISTORY ON GROWTHHISTORY 
(
  TIMESTAMP
);
