胶料维护规则
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
-- mes_material 新增物料阶段字段(销售物料为空,生产自动生成为 Bn/F)
|
||||
SET NAMES utf8mb4;
|
||||
|
||||
SET @db = DATABASE();
|
||||
|
||||
SET @sql = IF(
|
||||
(SELECT COUNT(*) FROM information_schema.COLUMNS WHERE TABLE_SCHEMA = @db AND TABLE_NAME = 'mes_material' AND COLUMN_NAME = 'material_phase') = 0,
|
||||
'ALTER TABLE `mes_material` ADD COLUMN `material_phase` varchar(16) DEFAULT NULL COMMENT ''物料阶段(销售为空,生产为B1/B2.../F)'' AFTER `customer_id`',
|
||||
'SELECT 1'
|
||||
);
|
||||
PREPARE stmt FROM @sql; EXECUTE stmt; DEALLOCATE PREPARE stmt;
|
||||
Reference in New Issue
Block a user