feat: 实现小程序离线巡检与可靠同步

This commit is contained in:
weijuesen
2026-08-14 09:03:48 +08:00
parent 6b222abb7b
commit 69ef5a0704
19 changed files with 543 additions and 19 deletions
+1 -1
View File
@@ -13,7 +13,7 @@ import (
)
// CurrentSchemaVersion 是当前后端代码期望的迁移版本。
const CurrentSchemaVersion = "6"
const CurrentSchemaVersion = "7"
// RunMigrations 使用嵌入式 SQL 迁移文件将数据库升级到最新版本。
func RunMigrations(db *gorm.DB) error {
@@ -116,4 +116,8 @@ func TestEmbeddedMigrationsIncludeBaseline(t *testing.T) {
if err != nil || next != 6 {
t.Fatalf("expected biosecurity migration version 6, got %d (err %v)", next, err)
}
next, err = driver.Next(next)
if err != nil || next != 7 {
t.Fatalf("expected inspection idempotency migration version 7, got %d (err %v)", next, err)
}
}