This commit is contained in:
2026-09-20 18:51:10 +08:00
parent 20a748cf7f
commit 417cbc6363
14 changed files with 551 additions and 12 deletions
@@ -0,0 +1,17 @@
-- Region: CN
-- Schema: baiyue_firstleg
-- Purpose: 将一件代发作业托盘码可空性收敛到当前空库基线。
-- Preconditions: 连接必须指向 baiyue_firstleg;fl_dropship_pallet.pallet_no 不存在 NULL。
-- Postconditions: pallet_no 为 varchar(32) NOT NULL。
SET NAMES utf8mb4;
SET @guard = IF(
EXISTS (SELECT 1 FROM fl_dropship_pallet WHERE pallet_no IS NULL LIMIT 1),
'SIGNAL SQLSTATE ''45000'' SET MESSAGE_TEXT = ''fl_dropship_pallet.pallet_no contains NULL''',
'SELECT 1'
);
PREPARE stmt FROM @guard; EXECUTE stmt; DEALLOCATE PREPARE stmt;
ALTER TABLE fl_dropship_pallet
MODIFY COLUMN pallet_no varchar(32) NOT NULL COMMENT '现场扫描的系统DP托盘码';