From e3e6db2d9974588f91ac1567a58fa4846655ce1b Mon Sep 17 00:00:00 2001
From: yearning <10538594+wangweifeng1999@user.noreply.gitee.com>
Date: 星期三, 30 九月 2026 12:54:55 +0800
Subject: [PATCH] 1.判断题优化;2.新增考评员是否能查看考生隐私开关

---
 backend/app/main.py |   15 +++++++++++++++
 1 files changed, 15 insertions(+), 0 deletions(-)

diff --git a/backend/app/main.py b/backend/app/main.py
index dfd53c4..7ed65de 100644
--- a/backend/app/main.py
+++ b/backend/app/main.py
@@ -50,6 +50,21 @@
             )
         except Exception:
             pass
+        try:
+            conn.exec_driver_sql(
+                "ALTER TABLE app_settings ADD COLUMN grader_can_see_privacy INTEGER NOT NULL DEFAULT 0"
+            )
+        except Exception:
+            pass
+        try:
+            conn.exec_driver_sql(
+                "ALTER TABLE examination_exam_examinee ADD COLUMN student_no VARCHAR(16)"
+            )
+        except Exception:
+            pass
+        conn.exec_driver_sql(
+            "CREATE INDEX IF NOT EXISTS ix_examination_exam_examinee_student_no ON examination_exam_examinee (student_no)"
+        )
 
     from app.database import SessionLocal
     from app.system_settings import get_or_create_settings

--
Gitblit v1.8.0