feat: 增加WOL服务端历史记录并支持跨浏览器同步

This commit is contained in:
mofeng-git
2026-02-11 17:04:40 +08:00
parent fb975875f1
commit 60b294e0ab
5 changed files with 176 additions and 18 deletions

View File

@@ -120,6 +120,26 @@ impl ConfigStore {
.execute(pool)
.await?;
sqlx::query(
r#"
CREATE TABLE IF NOT EXISTS wol_history (
mac_address TEXT PRIMARY KEY,
updated_at INTEGER NOT NULL
)
"#,
)
.execute(pool)
.await?;
sqlx::query(
r#"
CREATE INDEX IF NOT EXISTS idx_wol_history_updated_at
ON wol_history(updated_at DESC)
"#,
)
.execute(pool)
.await?;
Ok(())
}