From 6619fac199d6297e9c15966700d123d91a05e364 Mon Sep 17 00:00:00 2001 From: luotaiqian <1147642922@qq.com> Date: Wed, 15 Jul 2026 14:37:26 +0800 Subject: [PATCH] basic --- ...t-org-equipment-industry-code-20260715.sql | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 docs/db/increment-org-equipment-industry-code-20260715.sql diff --git a/docs/db/increment-org-equipment-industry-code-20260715.sql b/docs/db/increment-org-equipment-industry-code-20260715.sql new file mode 100644 index 0000000..e137fb0 --- /dev/null +++ b/docs/db/increment-org-equipment-industry-code-20260715.sql @@ -0,0 +1,23 @@ +-- ============================================= +-- 2026-07-15 表字段变更增量脚本 +-- 执行: mysql -u -p < increment-org-equipment-industry-code-20260715.sql +-- ============================================= + +SET NAMES utf8mb4; + +-- ============================================= +-- org_equipment 表 +-- ============================================= + +-- 1. instrument_type_code → industry_code 行业code +ALTER TABLE `org_equipment` CHANGE COLUMN `instrument_type_code` `industry_code` varchar(32) DEFAULT NULL COMMENT '行业code'; + +-- ============================================= +-- org_business_scope_device_ref 表 +-- ============================================= + +-- 2. device_code → device_type_code 设备类型code +ALTER TABLE `org_business_scope_device_ref` CHANGE COLUMN `device_code` `device_type_code` varchar(32) DEFAULT NULL COMMENT '设备类型code'; + +-- 3. device_name → device_type_name 设备类型名称 +ALTER TABLE `org_business_scope_device_ref` CHANGE COLUMN `device_name` `device_type_name` varchar(200) DEFAULT NULL COMMENT '设备类型名称';