-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmlab-schema.sql
38 lines (32 loc) · 1.23 KB
/
mlab-schema.sql
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
CREATE TABLE msmpoint (
skunitid TEXT PRIMARY KEY
, msmid TEXT NOT NULL UNIQUE
, name TEXT
, hardware TEXT
);
CREATE TABLE httpgetmt (
unit_id INTEGER NOT NULL
, dtime TEXT NOT NULL
, target TEXT
, address TEXT
, bytes_sec INTEGER
, threads INTEGER
, successes INTEGER
, failures INTEGER
, location_id INTEGER
, PRIMARY KEY ( unit_id, dtime )
, FOREIGN KEY ( unit_id ) REFERENCES msmpoint ( skunitid ) ON DELETE CASCADE
);
CREATE TABLE httpgetmt6 (
unit_id INTEGER NOT NULL
, dtime TEXT NOT NULL
, target TEXT
, address TEXT
, bytes_sec INTEGER
, threads INTEGER
, successes INTEGER
, failures INTEGER
, location_id INTEGER
, PRIMARY KEY ( unit_id, dtime )
, FOREIGN KEY ( unit_id ) REFERENCES msmpoint ( skunitid ) ON DELETE CASCADE
);