]> rtime.felk.cvut.cz Git - linux-conf-perf.git/blob - scripts/databaseinit.sql
Fix problem with wrongly printed first line in CNF file
[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         cfile TEXT NOT NULL, -- File path with configuration
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         mfile TEXT NOT NULL, -- File with measuring output
32         value DOUBLE PRECISION DEFAULT null, -- Measured data value
33         mtime timestamp NOT NULL, -- Time and date of measurement
34         linuxgit BIGINT REFERENCES linuxgit (id), -- Reference to git version of Linux
35         toolgit BIGINT REFERENCES toolsgit (id) -- Reference to git version of tools 
36 );