Brijesh's Git Server — argus-core @ 979f64deddba73493e6ef65581a166b4b7ecd9c3

Logging service

db.cql (view raw)

 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
 39
 40
 41
CREATE TABLE IF NOT EXISTS argus.users (
    id uuid,
    email text,
    password_hash text,
    created_at timestamp,
    updated_at timestamp,
    PRIMARY KEY (id, created_at)
) WITH CLUSTERING ORDER BY (created_at DESC);

CREATE TABLE IF NOT EXISTS argus.api_keys (
    id uuid,
    user_id uuid,
    name text,
    key_hash text,
    created_at timestamp,
    last_used_at timestamp,
    expires_at timestamp,
    is_active boolean,
    PRIMARY KEY (id, created_at)
) WITH CLUSTERING ORDER BY (created_at DESC);

CREATE TABLE IF NOT EXISTS argus.applications (
    id uuid,
    user_id uuid,
    name text,
    description text,
    key_hash text,
    created_at timestamp,
    updated_at timestamp,
    PRIMARY KEY (id, created_at)
) WITH CLUSTERING ORDER BY (created_at DESC);

CREATE TABLE IF NOT EXISTS argus.logs (
    application_id uuid,
    timestamp timestamp,
    log_id uuid,
    user_id uuid,
    log_level text,
    message text,
    PRIMARY KEY ((application_id), timestamp, log_id)
) WITH CLUSTERING ORDER BY (timestamp DESC);