20 lines
888 B
SQL
20 lines
888 B
SQL
-- 萌芽 Ping — MySQL 8+ 表结构说明(应用启动时 GORM AutoMigrate 会自动建表;本文件便于 DBA 审阅或手工执行)
|
||
-- 字符集务必 utf8mb4
|
||
|
||
CREATE DATABASE IF NOT EXISTS mengyaping
|
||
DEFAULT CHARACTER SET utf8mb4
|
||
COLLATE utf8mb4_unicode_ci;
|
||
|
||
USE mengyaping;
|
||
|
||
-- monitor_groups 网站分类
|
||
-- monitor_websites 监控站点主档(ip_addresses 为 JSON 数组)
|
||
-- monitor_website_urls 每个站点下多监控 URL
|
||
-- monitor_website_groups 站点与分类多对多
|
||
-- monitor_checks HTTP 探活历史(按保留天数定期清理)
|
||
|
||
-- monitor_kv 键值配置:admin_token;cfg_server / cfg_monitor / cfg_data_path / cfg_database(JSON)
|
||
-- 与下列 GORM 模型一致:
|
||
-- MonitorGroup, MonitorWebsite, MonitorWebsiteURL, MonitorWebsiteGroup,
|
||
-- MonitorProbeLatest, MonitorProbeHour, MonitorProbeDay, MonitorKV
|