feat(03-01): DB 迁移扩展设备字段 + 更新模型

- 新增迁移 000090:tb_device 扩展 5 个 Gateway sync-info 字段(online_status / last_online_time / software_version / switch_mode / last_gateway_sync_at)
- 新增迁移 000091:tb_device_sim_binding 新增 is_current 字段(当前使用卡标识)
- 更新 Device 模型新增对应 5 个字段
- 更新 DeviceSimBinding 模型新增 IsCurrent 字段
This commit is contained in:
2026-03-28 11:31:16 +08:00
parent 8a4c6f3cee
commit 42b884aaf8
6 changed files with 34 additions and 0 deletions

View File

@@ -0,0 +1,5 @@
-- 新增 is_current 字段,标识设备当前正在使用的卡(由 sync-info current_iccid 字段决定)
ALTER TABLE tb_device_sim_binding
ADD COLUMN is_current BOOLEAN NOT NULL DEFAULT FALSE;
COMMENT ON COLUMN tb_device_sim_binding.is_current IS '是否为当前使用的卡(同一设备同一时刻最多一条为 true';