-- QUIC节点采用稳定node_id与平台终端人工绑定，禁止同一节点绑定多个终端。
ALTER TABLE de_device_terminal_config
    ADD COLUMN quic_node_id varchar(128) NULL COMMENT 'QUIC稳定节点ID' AFTER description,
    ADD COLUMN quic_observed_ip varchar(128) NULL COMMENT 'Gateway观察到的QUIC源IP' AFTER quic_node_id,
    ADD COLUMN quic_session_id varchar(64) NULL COMMENT '当前QUIC注册会话ID' AFTER quic_observed_ip,
    ADD COLUMN quic_boot_id varchar(128) NULL COMMENT '终端操作系统启动ID' AFTER quic_session_id,
    ADD COLUMN quic_software_version varchar(64) NULL COMMENT 'cmvr-es软件版本' AFTER quic_boot_id,
    ADD COLUMN quic_online_status char(1) NOT NULL DEFAULT '0' COMMENT 'QUIC在线状态：0离线，1在线' AFTER quic_software_version,
    ADD COLUMN quic_last_heartbeat_time datetime(3) NULL COMMENT '最近QUIC心跳时间' AFTER quic_online_status,
    ADD UNIQUE KEY uk_terminal_quic_node_id (quic_node_id),
    ADD KEY idx_terminal_quic_online (quic_online_status, quic_last_heartbeat_time);
