-- ABS-32035
----------------------------------------------CONTRACTATTRIBUTE -------------------------------------------------
ALTER TABLE CONTRACTATTRIBUTE DROP COLUMN COMBINEDWITH_ID CASCADE CONSTRAINTS;

DELETE FROM CONTRACTATTRIBUTE C WHERE C.FACTORYNAME IN ('PaymentMethod','PaymentType','PayByCustomerNumber','CreditSqueezePerc','CreditLimit','DelinquentMarkAfter','CollectionResponsibleEmployeeNumber','PrepChargePrice');
COMMIT;


ALTER TABLE CONTRACTATTRIBUTE  MODIFY (INTERNALNAME VARCHAR2(30) NOT NULL);

CREATE UNIQUE INDEX XAK2CONTRACTATTRIBUTE ON CONTRACTATTRIBUTE (INTERNALNAME ASC);

-----------------------------------------------CONTRACTCOMPLIANCY ----------------------------------------------
ALTER TABLE CONTRACTCOMPLIANCY DROP COLUMN COMBINEDWITH_ID CASCADE CONSTRAINTS;

-----------------------------------------------CONTRACTCOMPONENTGRMCHANGES------------------------
ALTER TABLE CONTRACTCOMPONENTGRMCHANGES
MODIFY(CHARGEPREPCHARGE VARCHAR2(1) NULL);

-----------------------------------------------CONTRACTCOMPONENTBILLING------------------------
ALTER TABLE CONTRACTCOMPONENTBILLING
MODIFY
(INVOICEFREQUENCY_ID NUMBER NULL,
  MINIMUMINVOICEAMOUNT NUMBER NULL,
  SENDSTATEMENT NUMBER NULL,
  SENDSTATEMENTBY NUMBER NULL,
  ATTACHINVOICECOPIES VARCHAR2(1) NULL,
  STATEMENTPERCUSTOMER VARCHAR2(1) NULL);

-----------------------------------------------CONTRACTCOMPONENTPAYMENT------------------------
ALTER TABLE CONTRACTCOMPONENTPAYMENT
MODIFY(
  FINANCECHARGEDAYS NUMBER NULL,
  PUTFINANCECHARGEON NUMBER NULL);

