Passed
Pull Request — master (#117)
by
unknown
05:28
created

database.config   A

Complexity

Total Complexity 0

Size/Duplication

Total Lines 49
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 0
eloc 35
dl 0
loc 49
rs 10
c 0
b 0
f 0
1
tables = dict()
2
3
tables["calls"] = {"seesion_id": "integer", "ids": "varchar(400)"}
4
5
tables["mailing_mgmt"] = {
6
    "session_id": "integer",
7
    "mailing": "varchar(50)",
8
    "m_text": "varchar(1000)",
9
}
10
11
tables["mailings"] = {
12
    "mailing_id": "serial integer",
13
    "mailing_name": "varchar(70)",
14
    "mailing_slug": "varchar(30)",
15
}
16
17
tables["sessions"] = {
18
    "id": "serial integer",
19
    "vk_id": "integer",
20
    "state": "varchar(35)",
21
    "conversation": "integer default 2000000001",
22
}
23
24
tables["texts"] = {
25
    "session_id": "integer",
26
    "text": "varchar(1200)",
27
}
28
29
tables["users"] = {
30
    "id": "serial PRIMARY KEY",
31
    "vk_id": "BIGINT NOT NULL CHECK (vk_id > 0) UNIQUE",
32
    "tg_id": "BIGINT CHECK (tg_id > 0) UNIQUE",
33
}
34
35
tables["users_info"] = {
36
    "user_id": "INTEGER NOT NULL PRIMARY KEY",
37
    "first_name": "VARCHAR (50) NOT NULL",
38
    "second_name": "VARCHAR (50) NOT NULL",
39
    "group_num": "SMALLINT NOT NULL CHECK (group_num > 0)",
40
    "subgroup_num": "SMALLINT NOT NULL CHECK (subgroup_num > 0)",
41
    "academic_status": "SMALLINT NOT NULL",
42
}
43
44
tables["vk_subscriptions"] = {
45
    "user_id": "serial integer",
46
    "common": "smallint default 1",
47
    "schedule": "smallint default 1",
48
    "updates": "smallint default 0",
49
}
50