From 4cb10d4e2dca51c9361fe297202674a991e438ed Mon Sep 17 00:00:00 2001 From: matt Date: Thu, 21 Apr 2022 13:11:48 +0000 Subject: [PATCH] Mark storage should use unsigned ints --- utility/db/initDb.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/utility/db/initDb.js b/utility/db/initDb.js index 7c991e1..5de6382 100644 --- a/utility/db/initDb.js +++ b/utility/db/initDb.js @@ -69,7 +69,7 @@ tableCreate.set('testTemplate', ` testTemplateId varchar(36) NOT NULL PRIMARY KEY, accountId varchar(36) NOT NULL , name varchar(100) NOT NULL , - maxMark int NOT NULL, + maxMark int UNSIGNED NOT NULL, gradeBoundaries longtext ); `); @@ -116,7 +116,7 @@ tableCreate.set('testResult', ` studentId varchar(36) NOT NULL , testId varchar(36) NOT NULL , accountId varchar(36) NOT NULL , - mark int NOT NULL , + mark int UNSIGNED NOT NULL , time datetime NOT NULL , CONSTRAINT Unq_testResult UNIQUE ( studentId, testId ) );