From fa788237eb5649e08b2a38ec21689b481b10c073 Mon Sep 17 00:00:00 2001
From: nsfisis <nsfisis@gmail.com>
Date: Fri, 20 Feb 2026 21:30:49 +0900
Subject: feat(admin): add rejudge functionality for submissions

Allow administrators to re-execute test cases for a specific submission
from the submission detail page. This is useful after testcase fixes or
worker issues.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
---
 backend/query.sql | 3 +++
 1 file changed, 3 insertions(+)

(limited to 'backend/query.sql')

diff --git a/backend/query.sql b/backend/query.sql
index b4b589c..1e49780 100644
--- a/backend/query.sql
+++ b/backend/query.sql
@@ -271,6 +271,9 @@ FROM submissions
 WHERE submission_id = $1
 LIMIT 1;
 
+-- name: DeleteTestcaseResultsBySubmissionID :exec
+DELETE FROM testcase_results WHERE submission_id = $1;
+
 -- name: GetTestcaseResultsBySubmissionID :many
 SELECT *
 FROM testcase_results
-- 
cgit v1.3.1

