fix: resolve 5 review findings
Critical 1: Remove broken '钉钉绑定' tab (IntegConfig) — deleted /rbac/user-ding-mappings calls
Critical 2: Fix decorator placement in CreateClassDto — @IsOptional @IsArray restored to teachers
Important 1: Restore sync.service.spec.ts from 1fa3363, strip importDingTalkUsers tests
Important 2: Fix N+1 in batchImportStudents — batched find/save with In() operator
Important 3: Add migrate-student-ding-mapping.sql
This commit is contained in:
14
apps/server/migrate-student-ding-mapping.sql
Normal file
14
apps/server/migrate-student-ding-mapping.sql
Normal file
@@ -0,0 +1,14 @@
|
||||
-- Migration: Replace user_ding_mapping with student_ding_mapping
|
||||
-- Date: 2026-07-09
|
||||
|
||||
-- Drop old table
|
||||
DROP TABLE IF EXISTS user_ding_mapping;
|
||||
|
||||
-- Create new table
|
||||
CREATE TABLE IF NOT EXISTS student_ding_mapping (
|
||||
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
||||
ding_user_id VARCHAR(100) NOT NULL UNIQUE,
|
||||
student_id INTEGER NOT NULL UNIQUE,
|
||||
created_at DATETIME DEFAULT CURRENT_TIMESTAMP,
|
||||
FOREIGN KEY (student_id) REFERENCES students(id) ON DELETE CASCADE
|
||||
);
|
||||
Reference in New Issue
Block a user