升级管理
This commit is contained in:
@@ -172,8 +172,8 @@ tms:
|
||||
staging-root-dir: ${TMS_UPGRADE_STAGING_ROOT_DIR:/home/tmp/tms-upgrade-staging}
|
||||
# 升级任务统一日志目录。
|
||||
log-dir: ${TMS_UPGRADE_LOG_DIR:/home/tms/tmp/tms-upgrade-logs}
|
||||
# 升级包验签使用的“固件完整性密钥”公钥 blob(Base64 编码);为空时升级预检会拒绝通过。
|
||||
signature-public-key-base64: ${TMS_UPGRADE_SIGNATURE_PUBLIC_KEY_BASE64:}
|
||||
# 升级包验签使用的公钥 PEM 文件路径;为空时升级预检会拒绝通过。
|
||||
signature-public-key-pem-path: ${TMS_UPGRADE_SIGNATURE_PUBLIC_KEY_PEM_PATH:}
|
||||
mk:
|
||||
init-identify:
|
||||
# SDFE_InitIdentify 旧 PIN(Base64 编码);主密钥初始化接口会读取该值。
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
ALTER TABLE t_upgrade_task
|
||||
ADD COLUMN product_type VARCHAR(16) NULL AFTER target_component;
|
||||
|
||||
UPDATE t_upgrade_task
|
||||
SET product_type = 'ENTERPRISE'
|
||||
WHERE product_type IS NULL OR product_type = '';
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
ALTER TABLE t_upgrade_task
|
||||
CHANGE COLUMN target_component task_type VARCHAR(32) NOT NULL;
|
||||
|
||||
ALTER TABLE t_upgrade_task
|
||||
DROP INDEX idx_t_upgrade_task_component,
|
||||
ADD INDEX idx_t_upgrade_task_task_type (task_type);
|
||||
@@ -8,7 +8,8 @@
|
||||
<id property="id" column="id"/>
|
||||
<result property="taskId" column="task_id"/>
|
||||
<result property="upgradeMode" column="upgrade_mode"/>
|
||||
<result property="targetComponent" column="target_component"/>
|
||||
<result property="taskType" column="task_type"/>
|
||||
<result property="productType" column="product_type"/>
|
||||
<result property="packageFileId" column="package_file_id"/>
|
||||
<result property="packageName" column="package_name"/>
|
||||
<result property="packageHash" column="package_hash"/>
|
||||
@@ -28,7 +29,7 @@
|
||||
</resultMap>
|
||||
|
||||
<sql id="UpgradeTaskColumns">
|
||||
id, task_id, upgrade_mode, target_component, package_file_id, package_name, package_hash,
|
||||
id, task_id, upgrade_mode, task_type, product_type, package_file_id, package_name, package_hash,
|
||||
current_version, target_version, status, verify_passed, verify_message, manifest_json,
|
||||
detail_log_path, error_message, operator, started_at, finished_at, create_time, update_time
|
||||
</sql>
|
||||
@@ -52,8 +53,8 @@
|
||||
SELECT <include refid="UpgradeTaskColumns"/>
|
||||
FROM t_upgrade_task
|
||||
<where>
|
||||
<if test="targetComponent != null and targetComponent != ''">
|
||||
AND target_component = #{targetComponent}
|
||||
<if test="taskType != null and taskType != ''">
|
||||
AND task_type = #{taskType}
|
||||
</if>
|
||||
<if test="status != null and status != ''">
|
||||
AND status = #{status}
|
||||
@@ -67,8 +68,8 @@
|
||||
SELECT COUNT(1)
|
||||
FROM t_upgrade_task
|
||||
<where>
|
||||
<if test="targetComponent != null and targetComponent != ''">
|
||||
AND target_component = #{targetComponent}
|
||||
<if test="taskType != null and taskType != ''">
|
||||
AND task_type = #{taskType}
|
||||
</if>
|
||||
<if test="status != null and status != ''">
|
||||
AND status = #{status}
|
||||
|
||||
Reference in New Issue
Block a user