--ABS-100319/ ABS-106636

ALTER TABLE CONTRACT DROP COLUMN RAATEMPLATEHEADER_ID;

ALTER TABLE CONTRACTCOMPONENTMISC ADD (RAATEMPLATEHEADER_ID NUMBER NULL);

COMMENT ON COLUMN CONTRACTCOMPONENTMISC.RAATEMPLATEHEADER_ID
  IS 'Used for module MOBILEAPPACCESSTEMPLATE';

CREATE INDEX XIF2CONTRACTCOMPONENTMISC ON CONTRACTCOMPONENTMISC (RAATEMPLATEHEADER_ID ASC);

ALTER TABLE CONTRACTCOMPONENTMISC
  ADD CONSTRAINT FK_CONTRACTCOMPMISC_MAATEMPLH FOREIGN KEY (RAATEMPLATEHEADER_ID)
  REFERENCES MAATEMPLATEHEADER (MAATEMPLATEHEADER_ID) ON DELETE SET NULL;