


DROP TABLE OMALERT.OM_ALERT_TRIGGER_TABLE CASCADE CONSTRAINTS ;
/
CREATE TABLE OMALERT.OM_ALERT_TRIGGER_TABLE (
  TRIGGER_TABLE_ID      NUMBER (10)   NOT NULL,
  TRIGGER_TABLE_NAME    VARCHAR2 (30)  NOT NULL,
  TRIGGER_TABLE_SCHEMA  VARCHAR2 (30)  NOT NULL,
  TRIGGER_TABLE_TYPE    VARCHAR2 (20)  NOT NULL,
  TRIGGER_ID            NUMBER (10)   NOT NULL,
  CONSTRAINT OM_ALERT_TRG_TABLE_PK
  PRIMARY KEY ( TRIGGER_TABLE_ID ) ) ;
/

ALTER TABLE OMALERT.OM_ALERT_TRIGGER_TABLE ADD  CONSTRAINT OM_ALERT_TRG_UK
 UNIQUE (TRIGGER_TABLE_SCHEMA, TRIGGER_TABLE_NAME, TRIGGER_TABLE_TYPE, TRIGGER_ID) ;
/



GRANT ALTER ON OMALERT.OM_ALERT_TRIGGER_TABLE TO PUBLIC;
/

GRANT DELETE ON OMALERT.OM_ALERT_TRIGGER_TABLE TO PUBLIC;
/

GRANT INDEX ON OMALERT.OM_ALERT_TRIGGER_TABLE TO PUBLIC;
/

GRANT INSERT ON OMALERT.OM_ALERT_TRIGGER_TABLE TO PUBLIC;
/

GRANT SELECT ON OMALERT.OM_ALERT_TRIGGER_TABLE TO PUBLIC;
/

GRANT UPDATE ON OMALERT.OM_ALERT_TRIGGER_TABLE TO PUBLIC;
/

GRANT REFERENCES ON OMALERT.OM_ALERT_TRIGGER_TABLE TO PUBLIC;
/

ALTER TABLE OMALERT.OM_ALERT_TRIGGER_TABLE ADD  CONSTRAINT OM_ALERT_TRG_TRIGGER
 FOREIGN KEY (TRIGGER_ID)
  REFERENCES OMALERT.OM_ALERT_TRIGGER (TRIGGER_ID) ;
/




CREATE PUBLIC SYNONYM OM_ALERT_TRIGGER_TABLE FOR OM_ALERT_TRIGGER_TABLE;
/
