QAUP_Management/sql/add_metadata_column.sql
Tian jianyong 5e1e9f4507 统一了前后端到一个项目,实现了无人车的位置和超速检测,并发送到前端。
管理端在 Ruoyi 框架的基础上,对菜单进行了修改,并添加了司机信息、车辆信息和车辆类型管理。
2025-07-08 20:04:14 +08:00

12 lines
476 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.

-- 添加 metadata 字段到 rule_violation_events 表
-- 用于存储违规事件的额外元数据信息
ALTER TABLE rule_violation_events
ADD COLUMN IF NOT EXISTS metadata JSONB DEFAULT '{}';
-- 添加元数据字段的注释
COMMENT ON COLUMN rule_violation_events.metadata IS '违规事件附加元数据JSON格式';
-- 创建索引以支持 JSON 查询
CREATE INDEX IF NOT EXISTS idx_rule_violations_metadata_gin
ON rule_violation_events USING GIN(metadata);