diff options
| author | Fabian Mastenbroek <mail.fabianm@gmail.com> | 2018-03-11 20:35:28 +0100 |
|---|---|---|
| committer | Fabian Mastenbroek <mail.fabianm@gmail.com> | 2018-08-14 19:15:20 +0200 |
| commit | d8f5e2a7270a6aed04dac17048c6ef7229d3caab (patch) | |
| tree | d8e19508707fd4fc0f5ed66187dd878ed74b9aa5 | |
| parent | 1e7e32cf7c65a5c9138c54495f1cc3f277529dd1 (diff) | |
feat: Add stage measurements to schema
| -rw-r--r-- | database/schema.sql | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/database/schema.sql b/database/schema.sql index aa0ad1e5..9e356b4a 100644 --- a/database/schema.sql +++ b/database/schema.sql @@ -232,6 +232,20 @@ CREATE TABLE task_states ( ON UPDATE CASCADE ); +-- The measurements of a single stage +CREATE TABLE stage_measurements ( + id INTEGER PRIMARY KEY NOT NULL AUTO_INCREMENT, + experiment_id INTEGER NOT NULL, + tick INTEGER NOT NULL CHECK (tick >= 0), + stage INTEGER NOT NULL CHECK (stage >= 0), + duration INTEGER NOT NULL CHECK (duration >= 0), + size INTEGER NOT NULL CHECK (size >= 0), + + FOREIGN KEY (experiment_id) REFERENCES experiments (id) + ON DELETE CASCADE + ON UPDATE CASCADE +); + -- A machine state DROP TABLE IF EXISTS machine_states; CREATE TABLE machine_states ( |
