优化联络单号

This commit is contained in:
GukSang.Jin
2026-02-04 09:46:06 +08:00
parent 2276d92149
commit 2bb79e7738
5 changed files with 176 additions and 53 deletions

View File

@@ -0,0 +1,24 @@
/*
数据库回滚脚本 - 恢复联络单号和件号合并
执行日期: 2026-02-04
目的: 如果需要回滚删除ContactNumber和ItemNumber字段
影响表: scandata
*/
USE fullautowaterpressure;
-- 1. 删除索引
DROP INDEX IF EXISTS `idx_contact_number` ON `scandata`;
DROP INDEX IF EXISTS `idx_item_number` ON `scandata`;
-- 2. 删除新增字段
ALTER TABLE `scandata`
DROP COLUMN IF EXISTS `ContactNumber`,
DROP COLUMN IF EXISTS `ItemNumber`;
-- 3. 验证回滚
DESCRIBE `scandata`;
-- 4. 显示回滚后的数据
SELECT * FROM `scandata` ORDER BY Id DESC LIMIT 10;