Files
ClassManager/sql/upgrades/v1.3.sql
2026-05-28 20:48:29 +08:00

23 lines
850 B
SQL
Raw Permalink 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.
-- ===========================================
-- 班级操行分管理系统 - v1.2 → v1.3 升级脚本
-- 字符集: utf8mb4
--
-- 变更内容:
-- 1. 创建 operation_logs操作日志表
--
-- 兼容性: 使用 IF NOT EXISTS 实现幂等phpMyAdmin 可直接执行
-- ===========================================
CREATE TABLE IF NOT EXISTS `operation_logs` (
`log_id` BIGINT PRIMARY KEY AUTO_INCREMENT,
`operator_id` INT NOT NULL,
`operator_name` VARCHAR(50) DEFAULT NULL,
`operator_role` VARCHAR(50) DEFAULT NULL,
`operation_type` VARCHAR(50) NOT NULL,
`target_type` VARCHAR(50) DEFAULT NULL,
`target_id` INT DEFAULT NULL,
`details` TEXT,
`ip_address` VARCHAR(45) DEFAULT NULL,
`created_at` DATETIME DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;