Subversion Repositories XServices

Rev

Rev 201 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 201 Rev 203
Line 2... Line 2...
2
CREATE SCHEMA IF NOT EXISTS brutex;
2
CREATE SCHEMA IF NOT EXISTS brutex;
Line 3... Line 3...
3
 
3
 
4
CREATE TABLE IF NOT EXISTS brutex.tbl_events
4
CREATE TABLE IF NOT EXISTS brutex.tbl_events
5
            (
5
            (
6
            btx_event_type VARCHAR(128) NOT NULL,
6
            btx_event_type VARCHAR(128) NOT NULL,
7
            btx_id VARCHAR(32) NOT NULL,
7
            btx_id VARCHAR(128) NOT NULL,
8
            btx_obj_type VARCHAR(32) NOT NULL,
8
            btx_obj_type VARCHAR(32) NOT NULL,
9
            btx_obj_id VARCHAR(32) NOT NULL,
9
            btx_obj_id VARCHAR(32) NOT NULL,
10
            btx_timestamp BIGINT NOT NULL,
10
            btx_timestamp BIGINT NOT NULL,
11
            btx_event CLOB
11
            btx_event CLOB
12
            );
12
            );
13
CREATE INDEX IF NOT EXISTS brutex.btx_idx_key ON brutex.tbl_events (btx_obj_id, btx_obj_type, btx_event_type);
13
CREATE INDEX IF NOT EXISTS brutex.btx_idx_key ON brutex.tbl_events (btx_obj_id, btx_obj_type, btx_event_type);
-
 
14
CREATE INDEX IF NOT EXISTS brutex.btx_idx_ts ON brutex.tbl_events (btx_timestamp ASC);
Line 14... Line 15...
14
CREATE INDEX IF NOT EXISTS brutex.btx_idx_ts ON brutex.tbl_events (btx_timestamp ASC);
15
CREATE INDEX IF NOT EXISTS brutex.btx_idx_id ON brutex.tbl_events (btx_id);
15
 
16
 
16
 
17
 
17
CREATE TABLE IF NOT EXISTS brutex.tbl_events_snap
18
CREATE TABLE IF NOT EXISTS brutex.tbl_events_snap
18
(
19
(
19
    btx_event_type VARCHAR(128) NOT NULL,
20
    btx_event_type VARCHAR(128) NOT NULL,
20
    btx_id VARCHAR(32) NOT NULL,
21
    btx_id VARCHAR(128) NOT NULL,
21
    btx_obj_type VARCHAR(32) NOT NULL,
22
    btx_obj_type VARCHAR(32) NOT NULL,
22
    btx_obj_id VARCHAR(32) NOT NULL,
23
    btx_obj_id VARCHAR(32) NOT NULL,
Line 28... Line 29...
28
CREATE INDEX IF NOT EXISTS brutex.btx_idx_ts ON brutex.tbl_events_snap (btx_timestamp ASC);
29
CREATE INDEX IF NOT EXISTS brutex.btx_idx_ts ON brutex.tbl_events_snap (btx_timestamp ASC);
Line 29... Line 30...
29
 
30
 
30
CREATE TABLE IF NOT EXISTS brutex.tbl_events_errors
31
CREATE TABLE IF NOT EXISTS brutex.tbl_events_errors
31
(
32
(
32
    btx_event_type VARCHAR(128) NOT NULL,
33
    btx_event_type VARCHAR(128) NOT NULL,
33
    btx_id VARCHAR(32) NOT NULL,
34
    btx_id VARCHAR(128) NOT NULL,
34
    btx_obj_type VARCHAR(32) NOT NULL,
35
    btx_obj_type VARCHAR(32) NOT NULL,
35
    btx_obj_id VARCHAR(32) NOT NULL,
36
    btx_obj_id VARCHAR(32) NOT NULL,
36
    btx_timestamp BIGINT NOT NULL,
37
    btx_timestamp BIGINT NOT NULL,
37
    btx_retry BOOL,
38
    btx_retry BOOL,
38
    btx_response CLOB,
39
    btx_response CLOB,
39
    btx_event CLOB
40
    btx_event CLOB
40
);
41
);
41
CREATE INDEX IF NOT EXISTS brutex.btx_idx_ts ON brutex.tbl_events_errors (btx_timestamp ASC);
42
CREATE INDEX IF NOT EXISTS brutex.btx_idx_ts ON brutex.tbl_events_errors (btx_timestamp ASC);
-
 
43
CREATE INDEX IF NOT EXISTS brutex.btx_idx_retry ON brutex.tbl_events_errors (btx_retry);
-
 
44
 
-
 
45
CREATE TABLE IF NOT EXISTS brutex.tbl_events_all
-
 
46
(
-
 
47
    btx_event_type VARCHAR(128) NOT NULL,
-
 
48
    btx_id VARCHAR(128) NOT NULL,
-
 
49
    btx_obj_type VARCHAR(32) NOT NULL,
-
 
50
    btx_obj_id VARCHAR(32) NOT NULL,
-
 
51
    btx_timestamp BIGINT NOT NULL,
-
 
52
    btx_supersed_id VARCHAR(128),
-
 
53
    btx_event CLOB
-
 
54
);
-
 
55
 
-
 
56
CREATE INDEX IF NOT EXISTS brutex.btx_idx_ssed ON brutex.tbl_events_all (btx_supersed_id);
42
CREATE INDEX IF NOT EXISTS brutex.btx_idx_retry ON brutex.tbl_events_errors (btx_retry);
57
CREATE INDEX IF NOT EXISTS brutex.btx_idx_ts ON brutex.tbl_events_all (btx_timestamp ASC);