]> rtime.felk.cvut.cz Git - linux-conf-perf.git/blob - scripts/databaseinit.sql
Add skeleton for kconfig2sat tool
[linux-conf-perf.git] / scripts / databaseinit.sql
1 -- In this table are tracked versions of tools in git
2 CREATE TABLE toolsgit (
3         id BIGSERIAL PRIMARY KEY, -- Id
4         git_describe TEXT NOT NULL, -- Git describe string (--always --tags --dirty)
5         git_commit TEXT NOT NULL -- Commit hash of version of tool used for generating
6 );
7
8 -- In this table are tracked versions of measured Linux in git
9 CREATE TABLE linuxgit (
10         id BIGSERIAL PRIMARY KEY, -- Id
11         git_describe TEXT NOT NULL, -- Git describe scring (--always --tags --dirty)
12         git_commit TEXT NOT NULL -- Commit hash of version of tool used for generating
13 );
14
15 -- In this table are stored all generated configurations
16 CREATE TABLE configurations (
17         id BIGSERIAL PRIMARY KEY, -- Id
18         hash char(32) NOT NULL, -- Hash of configuration
19         generator TEXT NOT NULL, -- Text identificator of configure generation method
20         config TEXT NOT NULL, -- Full configuration in text form
21         gtime timestamp NOT NULL, -- Time and date of generation
22         linuxgit BIGINT REFERENCES linuxgit (id), -- Reference to git version of Linux
23         toolgit BIGINT REFERENCES toolsgit (id) -- Reference to git version of tools 
24 );
25
26 -- This table stores measured data
27 CREATE TABLE measure (
28         id BIGSERIAL PRIMARY KEY, -- Id
29         conf BIGINT REFERENCES configurations (id), -- Reference to configuration
30         measurement TEXT NOT NULL, -- Text identifivator of measuring tool
31         output TEXT NOT NULL, -- Output of boot
32         result TEXT NOT NULL, -- Result of boot script, if exited normally
33         value DOUBLE PRECISION DEFAULT null, -- Measured data value
34         mtime timestamp NOT NULL, -- Time and date of measurement
35         linuxgit BIGINT REFERENCES linuxgit (id), -- Reference to git version of Linux
36         toolgit BIGINT REFERENCES toolsgit (id) -- Reference to git version of tools 
37 );
38
39 -- In this table are sorted all used configuration options
40 -- Order in this table is fundamental for configuration hash calculation
41 CREATE TABLE configopt (
42         id BIGSERIAL PRIMARY KEY, -- Id
43         configopt TEXT NOT NULL -- Name of configuration option
44 );