Files
LabelChange-server/database/004_add_device_fields.sql
2026-06-01 16:30:29 +08:00

12 lines
527 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.

-- 为 label_scan_history 表添加设备信息字段
-- 用于跟踪每条扫描记录是哪个设备产生的
-- 执行时间2026-05-28
ALTER TABLE `label_scan_history`
ADD COLUMN `DeviceCode` VARCHAR(64) NULL COMMENT '设备唯一编码GUID' AFTER `CreatedBy`,
ADD COLUMN `DeviceName` VARCHAR(100) NULL COMMENT '设备名称(计算机名)' AFTER `DeviceCode`;
-- 为设备编码添加索引,方便按设备查询/统计
ALTER TABLE `label_scan_history`
ADD INDEX `IX_DeviceCode` (`DeviceCode`);