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:
5
migrations/000091_device_sim_binding_is_current.up.sql
Normal file
5
migrations/000091_device_sim_binding_is_current.up.sql
Normal 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)';
|
||||
Reference in New Issue
Block a user