Welcome to mirror list, hosted at ThFree Co, Russian Federation.

pgsql3.1.schema « scripts - github.com/isida/4.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 471702850b232fb95b0d37b06ff269fcd997f331 (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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
-- --------------------------------------------------------------------------- --
--                                                                             --
--    Postgresql scheme for iSida Jabber Bot                                   --
--    Copyright (C) 2012 diSabler <dsy@dsy.name>                               --
--                                                                             --
--    This program is free software: you can redistribute it and/or modify     --
--    it under the terms of the GNU General Public License as published by     --
--    the Free Software Foundation, either version 3 of the License, or        --
--    (at your option) any later version.                                      --
--                                                                             --
--    This program is distributed in the hope that it will be useful,          --
--    but WITHOUT ANY WARRANTY; without even the implied warranty of           --
--    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the            --
--    GNU General Public License for more details.                             --
--                                                                             --
--    You should have received a copy of the GNU General Public License        --
--    along with this program.  If not, see <http://www.gnu.org/licenses/>.    --
--                                                                             --
-- --------------------------------------------------------------------------- --

-- --------------------------------------------------------------------------- --
-- Conference config
--
CREATE TABLE config_conf (
	room text,
	option text,
	value text
);

CREATE INDEX config_conf_r ON config_conf (room);
CREATE INDEX config_conf_ro ON config_conf (room,option);

-- --------------------------------------------------------------------------- --
-- Owner config
--
CREATE TABLE config_owner (
	option text unique,
	value text
);

CREATE INDEX config_owner_o ON config_owner (option);

-- --------------------------------------------------------------------------- --
-- Top command
--
CREATE TABLE top (
	room text unique,
	count integer,
	time integer
);

CREATE INDEX top_r ON top (room);
CREATE INDEX top_rc ON top (room,count);

-- --------------------------------------------------------------------------- --
-- Aliases
--
CREATE TABLE alias (
	room text,
	match text,
	cmd text
);

CREATE INDEX alias_r ON alias (room);
CREATE INDEX alias_rm ON alias (room,match);

-- --------------------------------------------------------------------------- --
-- Blacklist for rooms
--
CREATE TABLE blacklist (
	room text unique
);

-- --------------------------------------------------------------------------- --
-- Comm ON/OFF
--
CREATE TABLE commonoff (
	room text,
	cmd text
);

CREATE INDEX commonoff_r ON commonoff (room);
CREATE INDEX commonoff_rm ON commonoff (room,cmd);

-- --------------------------------------------------------------------------- --
-- Rooms list
--
CREATE TABLE conference (
	room text unique,
	passwd text
);

-- --------------------------------------------------------------------------- --
-- Feeds
--
CREATE TABLE feed (
	url text,
	update text,
	type text,
	time integer,
	room text,
	hash text array[10]
);

CREATE INDEX feed_r ON feed (room);
CREATE INDEX feed_rt ON feed (room,time);

-- --------------------------------------------------------------------------- --
-- Hiden rooms
--
CREATE TABLE hiden_rooms (
	room text unique
);

-- --------------------------------------------------------------------------- --
-- Bot Ignore
--
CREATE TABLE bot_ignore (
	pattern text unique
);

CREATE INDEX bot_ignore_p ON bot_ignore (pattern);

-- --------------------------------------------------------------------------- --
-- Bot Owner
--
CREATE TABLE bot_owner (
	jid text unique
);

CREATE INDEX bot_owner_j ON bot_owner (jid);

-- --------------------------------------------------------------------------- --
-- Logs in rooms
--
CREATE TABLE log_rooms (
	room text unique
);

CREATE INDEX log_rooms_r ON log_rooms (room);

-- --------------------------------------------------------------------------- --
-- Spy for activity
--
CREATE TABLE spy (
	room text unique,
	time integer,
	participant integer,
	message integer,
	pattern text
);

CREATE INDEX spy_r ON spy (room);
CREATE INDEX spy_rt ON spy (room,time);

-- --------------------------------------------------------------------------- --
-- Temporary ban
--
CREATE TABLE tmp_ban (
	room text,
	jid text,
	time integer
);

CREATE INDEX tmp_ban_r ON tmp_ban (room);
CREATE INDEX tmp_ban_rt ON tmp_ban (room,time);

-- --------------------------------------------------------------------------- --
-- Say to owner
--
CREATE TABLE saytoowner (
	jid text unique,
	time integer
);

-- --------------------------------------------------------------------------- --
-- Ignore ban for global_ban
--
CREATE TABLE ignore_ban (
	room text unique
);

-- --------------------------------------------------------------------------- --
-- First join time
--
CREATE TABLE first_join (
	room text,
	jid text,
	time integer
);

CREATE INDEX join_rj ON first_join (room,jid);

-- --------------------------------------------------------------------------- --
-- THE END
-- --------------------------------------------------------------------------- --