diff options
author | Karel Kočí <cynerd@email.cz> | 2015-07-28 10:26:51 +0200 |
---|---|---|
committer | Karel Kočí <cynerd@email.cz> | 2015-07-28 10:26:51 +0200 |
commit | 181fe43c48c7f4c83c617a147769f4c3eba4774c (patch) | |
tree | 1e2ada9ccb0e475a7b6963c2323c4e5056f630d5 /scripts/databaseinit.sql | |
parent | c8a33ffb0aad5ebc2f50045eb8a460daa67f446d (diff) | |
download | linux-conf-perf-181fe43c48c7f4c83c617a147769f4c3eba4774c.tar.gz linux-conf-perf-181fe43c48c7f4c83c617a147769f4c3eba4774c.tar.bz2 linux-conf-perf-181fe43c48c7f4c83c617a147769f4c3eba4774c.zip |
Add database table linuxgit and fix prepare sql command
Diffstat (limited to 'scripts/databaseinit.sql')
-rw-r--r-- | scripts/databaseinit.sql | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/scripts/databaseinit.sql b/scripts/databaseinit.sql index eee51fa..fb765ca 100644 --- a/scripts/databaseinit.sql +++ b/scripts/databaseinit.sql @@ -1,16 +1,24 @@ -- In this table are tracked versions of tools in git CREATE TABLE toolsgit ( id BIGSERIAL PRIMARY KEY, -- Id - git_describe text NOT NULL, -- Git describe string (--always --tags --dirty) - git_commit text NOT NULL -- Commit hash of version of tool used for generating + git_describe TEXT NOT NULL, -- Git describe string (--always --tags --dirty) + git_commit TEXT NOT NULL -- Commit hash of version of tool used for generating +); + +-- In this table are tracked versions of measured Linux in git +CREATE TABLE linuxgit ( + id BIGSERIAL PRIMARY KEY, -- Id + git_describe TEXT NOT NULL, -- Git describe scring (--always --tags --dirty) + git_commit TEXT NOT NULL -- Commit hash of version of tool used for generating ); -- In this table are stored all generated configurations CREATE TABLE configurations ( id BIGSERIAL PRIMARY KEY, -- Id - hash char(34) NOT NULL, -- Hash of configuration - cfile text NOT NULL, -- File path with configuration + hash char(32) NOT NULL, -- Hash of configuration + cfile TEXT NOT NULL, -- File path with configuration gtime timestamp NOT NULL, -- Time and date of generation + linuxgit BIGINT REFERENCES linuxgit (id), -- Reference to git version of Linux toolgit BIGINT REFERENCES toolsgit (id) -- Reference to git version of tools ); @@ -18,8 +26,10 @@ CREATE TABLE configurations ( CREATE TABLE measure ( id BIGSERIAL PRIMARY KEY, -- Id conf BIGINT REFERENCES configurations (id), -- Reference to configuration - mfile text NOT NULL, -- File with measuring output - value BIGINT DEFAULT null, -- Measured data value + measurement TEXT NOT NULL, -- Text identifivator of measuring tool + mfile TEXT NOT NULL, -- File with measuring output + value DOUBLE PRECISION DEFAULT null, -- Measured data value mtime timestamp NOT NULL, -- Time and date of measurement + linuxgit BIGINT REFERENCES linuxgit (id), -- Reference to git version of Linux toolgit BIGINT REFERENCES toolsgit (id) -- Reference to git version of tools ); |