-- ABS-46821

ALTER TABLE LEGALENTITY ADD (BANKINSTITUTION2_ID NUMBER NULL);

CREATE INDEX XIF6LEGALENTITY ON LEGALENTITY (BANKINSTITUTION2_ID ASC);

ALTER TABLE LEGALENTITY 
  ADD CONSTRAINT LEGALENTITY_BANKINST2_ID FOREIGN KEY (BANKINSTITUTION2_ID)
  REFERENCES BANKINSTITUTION (BANKINSTITUTION_ID) ON DELETE SET NULL;