Files
qhmes/jeecg-boot/db/mes-xsl-biz-entity-field-detail-alter-slot-columns.sql

29 lines
1.4 KiB
Java
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.
-- 升级脚本仅为缺失的列执行 ADD可重复执行不会因列已存在报错
-- 适用旧库 mes_xsl_biz_entity_field_detail 缺少 detail_property_name / detail_slot_kind
SET NAMES utf8mb4;
SELECT COUNT(*) INTO @jeecg_chk_dpn FROM information_schema.COLUMNS
WHERE TABLE_SCHEMA = DATABASE()
AND TABLE_NAME = 'mes_xsl_biz_entity_field_detail'
AND COLUMN_NAME = 'detail_property_name';
SET @jeecg_sql_dpn := IF(@jeecg_chk_dpn = 0,
'ALTER TABLE mes_xsl_biz_entity_field_detail ADD COLUMN detail_property_name varchar(128) DEFAULT NULL COMMENT ''主实体明细属性名与打印绑定 detailProperty 一致'' AFTER profile_id',
'SELECT ''detail_property_name 已存在跳过'' AS msg');
PREPARE jeecg_stmt_dpn FROM @jeecg_sql_dpn;
EXECUTE jeecg_stmt_dpn;
DEALLOCATE PREPARE jeecg_stmt_dpn;
SELECT COUNT(*) INTO @jeecg_chk_dsk FROM information_schema.COLUMNS
WHERE TABLE_SCHEMA = DATABASE()
AND TABLE_NAME = 'mes_xsl_biz_entity_field_detail'
AND COLUMN_NAME = 'detail_slot_kind';
SET @jeecg_sql_dsk := IF(@jeecg_chk_dsk = 0,
'ALTER TABLE mes_xsl_biz_entity_field_detail ADD COLUMN detail_slot_kind varchar(16) DEFAULT NULL COMMENT ''LIST OBJECT'' AFTER detail_property_name',
'SELECT ''detail_slot_kind 已存在跳过'' AS msg');
PREPARE jeecg_stmt_dsk FROM @jeecg_sql_dsk;
EXECUTE jeecg_stmt_dsk;
DEALLOCATE PREPARE jeecg_stmt_dsk;