-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathbeacon_alert_actions.tbl
More file actions
38 lines (31 loc) · 1.26 KB
/
beacon_alert_actions.tbl
File metadata and controls
38 lines (31 loc) · 1.26 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
--------------------------------------------------------
-- File created - Tuesday-September-12-2017
--------------------------------------------------------
WHENEVER SQLERROR EXIT
--------------------------------------------------------
-- DDL for Table ALERT_ACTIONS
--------------------------------------------------------
CREATE TABLE "BEACON"."ALERT_ACTIONS" (
"ALERT_ID" NUMBER,
"ACTION_ID" NUMBER
);
--------------------------------------------------------
-- DDL for Index ALERT_ACTIONS_PK
--------------------------------------------------------
CREATE UNIQUE INDEX "BEACON"."ALERT_ACTIONS_PK" ON
"BEACON"."ALERT_ACTIONS" (
"ALERT_ID",
"ACTION_ID"
);
--------------------------------------------------------
-- Constraints for Table ALERT_ACTIONS
--------------------------------------------------------
ALTER TABLE "BEACON"."ALERT_ACTIONS" ADD CONSTRAINT "ALERT_ACTIONS_PK" PRIMARY KEY ( "ALERT_ID","ACTION_ID" )
USING INDEX ALERT_ACTIONS_PK
ENABLE VALIDATE;
ALTER TABLE alert_actions ADD CONSTRAINT alert_actions_fk1 FOREIGN KEY ( action_id )
REFERENCES actions ( id )
ENABLE VALIDATE;
ALTER TABLE alert_actions ADD CONSTRAINT alert_actions_fk2 FOREIGN KEY ( alert_id )
REFERENCES alerts ( id )
ENABLE VALIDATE;