aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--backend/db/models.go1
-rw-r--r--backend/schema.sql1
2 files changed, 2 insertions, 0 deletions
diff --git a/backend/db/models.go b/backend/db/models.go
index a8729e4..49e4b52 100644
--- a/backend/db/models.go
+++ b/backend/db/models.go
@@ -53,6 +53,7 @@ type TestcaseResult struct {
Status string
Stdout string
Stderr string
+ CreatedAt pgtype.Timestamp
}
type User struct {
diff --git a/backend/schema.sql b/backend/schema.sql
index 3cc7ed9..53c68ec 100644
--- a/backend/schema.sql
+++ b/backend/schema.sql
@@ -71,6 +71,7 @@ CREATE TABLE testcase_results (
status VARCHAR(16) NOT NULL,
stdout TEXT NOT NULL,
stderr TEXT NOT NULL,
+ created_at TIMESTAMP NOT NULL DEFAULT NOW(),
CONSTRAINT fk_submission_id FOREIGN KEY(submission_id) REFERENCES submissions(submission_id),
CONSTRAINT fk_testcase_id FOREIGN KEY(testcase_id) REFERENCES testcases(testcase_id)
);