admin/sql/C_parcel_item_AttributeText.sql
zzh a1daea6b35 refactor: 仓储表 C_* 改为 c_*,优化专线小包批量模板
- 仓储实体与 db.sql 统一为小写 c_ 前缀,新增 migrate_rename_warehouse_C_to_c.sql
- 专线小包批量模板精简版/标准版双模板,Excel 必填标红与发件地址上传参数

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-22 16:18:59 +08:00

17 lines
544 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.

-- 已有库增量:c_parcel_item.AttributeText
-- 可重复执行
SET @col_exists := (
SELECT COUNT(1)
FROM information_schema.COLUMNS
WHERE TABLE_SCHEMA = DATABASE()
AND TABLE_NAME = 'c_parcel_item'
AND COLUMN_NAME = 'AttributeText'
);
SET @sql := IF(
@col_exists = 0,
'ALTER TABLE `c_parcel_item` ADD COLUMN `AttributeText` VARCHAR(256) NULL COMMENT ''规格属性'' AFTER `ProductName`',
'SELECT ''c_parcel_item.AttributeText already exists'' AS info'
);
PREPARE stmt FROM @sql; EXECUTE stmt; DEALLOCATE PREPARE stmt;