-- ABS-86966 / ABS-88070
CREATE SEQUENCE SEQ_WORKORDERLINEEMBLEMNAME
START WITH 1
INCREMENT BY 1;

CREATE TABLE WORKORDERLINEEMBLEMNAME
(
WORKORDERLINEEMBLEMNAME_ID NUMBER NOT NULL,
WORKORDERLINEEMBLEM_ID NUMBER NOT NULL,
EMBLEMNAME VARCHAR2(40) NOT NULL,
SYSTEMUSER_ID NUMBER NOT NULL,
TIMESTAMP DATE NOT NULL
);

ALTER TABLE WORKORDERLINEEMBLEMNAME ADD CONSTRAINT XPKWORKORDERLINEEMBLEMNAME PRIMARY KEY (WORKORDERLINEEMBLEMNAME_ID);

CREATE INDEX XIF1WORKORDERLINEEMBLEMNAME ON WORKORDERLINEEMBLEMNAME (WORKORDERLINEEMBLEM_ID ASC);

ALTER TABLE WORKORDERLINEEMBLEMNAME ADD CONSTRAINT FK_WOLINEEMBNAME_WOLEMB FOREIGN KEY (WORKORDERLINEEMBLEM_ID)
REFERENCES WORKORDERLINEEMBLEM (WORKORDERLINEEMBLEM_ID) ON DELETE CASCADE;