From 4ad9df0973a5efc160feda37e9dba3f1bcfb08fd Mon Sep 17 00:00:00 2001
From: Matthijs Bijman <matthijs@bijman.org>
Date: Mon, 27 Feb 2017 13:15:42 +0100
Subject: Add cores_used column to task_states table

---
 database/schema.sql | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

(limited to 'database/schema.sql')

diff --git a/database/schema.sql b/database/schema.sql
index 5604d419..01172b99 100644
--- a/database/schema.sql
+++ b/database/schema.sql
@@ -148,8 +148,9 @@ CREATE TABLE IF NOT EXISTS task_states (
     id                      INTEGER PRIMARY KEY     NOT NULL,
     task_id                 INTEGER                 NOT NULL,
     experiment_id           INTEGER                 NOT NULL,
-    tick                    INTEGER                 NOT NULL,
-    flops_left              INTEGER                 NOT NULL,
+    tick                    INTEGER                 NOT NULL CHECK (tick >= 0),
+    flops_left              INTEGER                 NOT NULL CHECK (flops_left >= 0),
+	cores_used				INTEGER					NOT NULL CHECK (cores_used >= 0),
 
     FOREIGN KEY (task_id) REFERENCES tasks (id),
     FOREIGN KEY (experiment_id) REFERENCES experiments (id)
-- 
cgit v1.2.3

