diff options
| -rw-r--r-- | database/schema.sql | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/database/schema.sql b/database/schema.sql index 9e356b4a..3b751c30 100644 --- a/database/schema.sql +++ b/database/schema.sql @@ -233,6 +233,7 @@ CREATE TABLE task_states ( ); -- The measurements of a single stage +DROP TABLE IF EXISTS stage_measurements; CREATE TABLE stage_measurements ( id INTEGER PRIMARY KEY NOT NULL AUTO_INCREMENT, experiment_id INTEGER NOT NULL, @@ -246,6 +247,24 @@ CREATE TABLE stage_measurements ( ON UPDATE CASCADE ); +-- Metrics of a single task +DROP TABLE IF EXISTS task_metrics; +CREATE TABLE task_metrics ( + id INTEGER PRIMARY KEY NOT NULL AUTO_INCREMENT, + experiment_id INTEGER NOT NULL, + task_id INTEGER NOT NULL, + waiting INTEGER NOT NULL CHECK (waiting >= 0), + execution INTEGER NOT NULL CHECK (execution >= 0), + turnaround INTEGER NOT NULL CHECK (turnaround >= 0), + + FOREIGN KEY (experiment_id) REFERENCES experiments (id) + ON DELETE CASCADE + ON UPDATE CASCADE, + FOREIGN KEY (task_id) REFERENCES tasks (id) + ON DELETE CASCADE + ON UPDATE CASCADE +); + -- A machine state DROP TABLE IF EXISTS machine_states; CREATE TABLE machine_states ( |
