summaryrefslogtreecommitdiff
path: root/extras/m_sqllog.postgresql.sql
blob: 2e40dd90d1670b16e5b92737b24f9ef113abaae5 (plain)
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
42
43
44
45
46
47
48
49
50
51
--
-- PostgreSQL database dump
--

CREATE TABLE ircd_log (
    id serial NOT NULL,
    category_id bigint,
    nick bigint,
    host bigint,
    source bigint,
    dtime bigint DEFAULT 0 NOT NULL
);
ALTER TABLE ONLY ircd_log
    ADD CONSTRAINT ircd_log_pkey PRIMARY KEY (id);



CREATE TABLE ircd_log_actors (
    id serial NOT NULL,
    actor text
);
ALTER TABLE ONLY ircd_log_actors
    ADD CONSTRAINT ircd_log_actors_pkey PRIMARY KEY (id);



CREATE TABLE ircd_log_categories (
    category_id serial NOT NULL,
    category text NOT NULL
);

INSERT INTO ircd_log_categories VALUES (1, 'Oper');
INSERT INTO ircd_log_categories VALUES (2, 'Kill');
INSERT INTO ircd_log_categories VALUES (3, 'Server Link');
INSERT INTO ircd_log_categories VALUES (4, 'G/Z/K/E Line');
INSERT INTO ircd_log_categories VALUES (5, 'Connect');
INSERT INTO ircd_log_categories VALUES (6, 'Disconnect');
INSERT INTO ircd_log_categories VALUES (7, 'Flooding');
INSERT INTO ircd_log_categories VALUES (8, 'Load Module');

ALTER TABLE ONLY ircd_log_categories
    ADD CONSTRAINT ircd_log_categories_pkey PRIMARY KEY (category_id);



CREATE TABLE ircd_log_hosts (
    id serial NOT NULL,
    hostname text
);
ALTER TABLE ONLY ircd_log_hosts
    ADD CONSTRAINT ircd_log_hosts_pkey PRIMARY KEY (id);