-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcreate_schema.sql
More file actions
33 lines (30 loc) · 837 Bytes
/
Copy pathcreate_schema.sql
File metadata and controls
33 lines (30 loc) · 837 Bytes
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
-- Schema for the BEGBot configuration.
-- Keeps track of the users and their privileges.
create table user (
id integer primary key autoincrement not null,
username text,
firstname text,
lastname text,
telegram_id integer,
added date,
beg integer,
admin integer,
bday date
);
-- Keeps track of the sessions the bot is active/connected.
create table session (
id integer primary key autoincrement not null,
start date,
end date
);
-- Persists messages in an archive
create table message (
id integer primary key autoincrement not null,
session_id integer,
message_id integer,
update_id integer,
telegram_id integer,
group_id integer,
received date,
content text
);