Files
NextEdu/drizzle/0018_attendance_status_reason.sql
SpecialX 365c36d97b feat(db): add migrations for RBAC, diagnostic, messaging, attendance, leave, invitation codes
- 0011: RBAC role flags and seed data

- 0012: diagnostic grade_id

- 0013: message recall

- 0014: message templates

- 0015: group messages and message reports/blocks

- 0016: invitation codes

- 0017: draft device sync

- 0018: attendance status reason

- 0019: attendance warning thresholds

- 0020: leave requests

- 0021: attendance period
2026-07-03 10:23:24 +08:00

12 lines
706 B
SQL
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
-- L-1: 考勤状态细分 + 原因字段
-- 1. 扩展 attendance_records.status 枚举:新增 'school_activity'(校内活动请假,如运动会、研学、社团活动)
-- 2. 新增 reason 字段:记录缺勤/迟到/早退/请假的具体原因(最多 255 字符),与 remark 区分
-- - remark教师备注自由文本可记录点名时观察到的情况
-- - reason标准化原因用于统计与家长通知如"病假-感冒"、"家中有事"等)
ALTER TABLE `attendance_records`
MODIFY COLUMN `status`
ENUM('present','absent','late','early_leave','excused','school_activity') NOT NULL;
ALTER TABLE `attendance_records` ADD COLUMN `reason` varchar(255);