-- ABS-88400 / ABS-88478
--- REASONCODE ---
ALTER TABLE REASONCODE ADD (CHARGEMBYO VARCHAR2(1) DEFAULT 'Y' NOT NULL
				CONSTRAINT CHK_REASONCODE_CHARGEMBYO CHECK (CHARGEMBYO IN ('Y','N')));

--- UNIQUEITEMMBYO ---
ALTER TABLE UNIQUEITEMMBYO ADD (REASONCODE_ID NUMBER NULL);

CREATE INDEX XIF3UNIQUEITEMMBYO ON UNIQUEITEMMBYO (REASONCODE_ID ASC);

ALTER TABLE UNIQUEITEMMBYO ADD CONSTRAINT FK_UNIQUEITEMMBYO_RCID FOREIGN KEY (REASONCODE_ID)
REFERENCES REASONCODE (REASONCODE_ID) ON DELETE SET NULL;

--- NONUNIQUEITEMMBYO ---
ALTER TABLE NONUNIQUEITEMMBYO ADD (REASONCODE_ID NUMBER NULL);

CREATE INDEX XIF3NONUNIQUEITEMMBYO ON NONUNIQUEITEMMBYO (REASONCODE_ID ASC);

ALTER TABLE NONUNIQUEITEMMBYO ADD CONSTRAINT FK_NONUNIQUEITEMMBYO_RCID FOREIGN KEY (REASONCODE_ID)
REFERENCES REASONCODE (REASONCODE_ID) ON DELETE SET NULL;