-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinitial.sql
More file actions
64 lines (64 loc) · 1.62 KB
/
initial.sql
File metadata and controls
64 lines (64 loc) · 1.62 KB
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
DROP TABLE IF EXISTS metrics;
DROP TABLE IF EXISTS summary;
DROP TABLE IF EXISTS critic;
DROP TABLE IF EXISTS dependencies;
DROP TABLE IF EXISTS inheritance;
DROP TABLE IF EXISTS gitlog;
DROP TABLE IF EXISTS gitcommits;
CREATE TABLE metrics(
id integer primary key autoincrement,
module text,
subname text,
complexity integer,
lines integer
);
CREATE INDEX idx_metrics_module ON metrics (module);
CREATE TABLE summary(
id integer primary key autoincrement,
module text,
max_complexity integer,
lines integer,
pod integer,
avg_complexity integer,
sub_count integer,
jsondata text
);
CREATE INDEX idx_summary_module ON summary (module);
CREATE TABLE critic(
id integer primary key autoincrement,
module text,
critic text,
line_number integer,
source text,
explanation text
);
CREATE INDEX idx_critic_module ON critic (module);
CREATE TABLE dependencies(
id integer primary key autoincrement,
module text,
dependencies text
);
CREATE INDEX idx_dependencies_module ON dependencies (module);
CREATE TABLE inheritance(
id integer primary key autoincrement,
module text,
inheritance text
);
CREATE INDEX idx_inheritance_module ON inheritance (module);
CREATE TABLE role(
id integer primary key autoincrement,
module text,
role text
);
CREATE INDEX idx_role_module ON role (module);
CREATE TABLE gitlog(
module text,
latest_commit_sha text,
log text
);
CREATE INDEX idx_gitlog_module ON gitlog (module);
CREATE TABLE gitcommits(
date text,
commits integer
);
CREATE INDEX idx_gitcommits_module ON gitcommits (date);