Subversion Repositories XServices

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
201 brianR 1
-- Create Schema for Brutex
2
CREATE SCHEMA IF NOT EXISTS brutex;
3
 
4
CREATE TABLE IF NOT EXISTS brutex.tbl_events
5
            (
6
            btx_event_type VARCHAR(128) NOT NULL,
7
            btx_id VARCHAR(32) NOT NULL,
8
            btx_obj_type VARCHAR(32) NOT NULL,
9
            btx_obj_id VARCHAR(32) NOT NULL,
10
            btx_timestamp BIGINT NOT NULL,
11
            btx_event CLOB
12
            );
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);
15
 
16
 
17
CREATE TABLE IF NOT EXISTS brutex.tbl_events_snap
18
(
19
    btx_event_type VARCHAR(128) NOT NULL,
20
    btx_id VARCHAR(32) NOT NULL,
21
    btx_obj_type VARCHAR(32) NOT NULL,
22
    btx_obj_id VARCHAR(32) NOT NULL,
23
    btx_timestamp BIGINT NOT NULL,
24
    btx_run BIGINT NOT NULL,
25
    btx_event CLOB
26
);
27
 
28
CREATE INDEX IF NOT EXISTS brutex.btx_idx_ts ON brutex.tbl_events_snap (btx_timestamp ASC);
29
 
30
CREATE TABLE IF NOT EXISTS brutex.tbl_events_errors
31
(
32
    btx_event_type VARCHAR(128) NOT NULL,
33
    btx_id VARCHAR(32) NOT NULL,
34
    btx_obj_type VARCHAR(32) NOT NULL,
35
    btx_obj_id VARCHAR(32) NOT NULL,
36
    btx_timestamp BIGINT NOT NULL,
37
    btx_retry BOOL,
38
    btx_response CLOB,
39
    btx_event CLOB
40
);
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_retry ON brutex.tbl_events_errors (btx_retry);