Files
junhong_cmp_fiber/migrations/000120_add_polling_card_status.up.sql
huang e2003eb9e3 feat: 新增卡状态检查轮询数据库迁移
tb_polling_config 新增 card_status_check_interval INT NULL
tb_iot_card 新增 last_card_status_check_at TIMESTAMPTZ NULL
含 IF NOT EXISTS 保证幂等,含完整回滚文件

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-15 12:21:21 +08:00

14 lines
719 B
SQL
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
-- 新增卡状态轮询相关列
-- tb_polling_config 新增 card_status_check_interval配置卡状态检查间隔NULL 表示不启用
-- tb_iot_card 新增 last_card_status_check_at记录最后一次卡状态检查时间与其他 last_*_check_at 字段保持一致
ALTER TABLE tb_polling_config
ADD COLUMN IF NOT EXISTS card_status_check_interval INT NULL;
COMMENT ON COLUMN tb_polling_config.card_status_check_interval IS '卡状态检查间隔NULL 表示不启用卡状态轮询';
ALTER TABLE tb_iot_card
ADD COLUMN IF NOT EXISTS last_card_status_check_at TIMESTAMPTZ NULL;
COMMENT ON COLUMN tb_iot_card.last_card_status_check_at IS '最后一次卡状态检查时间';