refactor: 移除 SQLite 支持,仅保留 MySQL

This commit is contained in:
2026-08-05 17:43:13 +08:00
parent 81e622fa09
commit 47720a8fcc
35 changed files with 111 additions and 1961 deletions

View File

@@ -244,8 +244,8 @@ export class AttendanceLessonService {
} catch (err: unknown) {
const code = (err as Record<string, unknown>).code;
const errno = (err as Record<string, unknown>).errno;
// MySQL: ER_DUP_ENTRY or errno 1062; SQLite: SQLITE_CONSTRAINT
if (code === 'ER_DUP_ENTRY' || errno === 1062 || code === 'SQLITE_CONSTRAINT') {
// MySQL: ER_DUP_ENTRY or errno 1062
if (code === 'ER_DUP_ENTRY' || errno === 1062) {
const existing = await sessionRepo.findOne({
where: { scheduleId, lessonDate },
});