Files
junhong_cmp_fiber/migrations/archive/000057_optimize_iot_card_indexes.down.sql

9 lines
268 B
SQL

-- 回滚:恢复全局索引,删除 carrier 复合索引
DROP INDEX IF EXISTS idx_iot_card_standalone_shop_carrier_created;
CREATE INDEX IF NOT EXISTS idx_iot_card_global_created_at
ON tb_iot_card (created_at DESC)
WHERE deleted_at IS NULL;
ANALYZE tb_iot_card;