feat(canvas): 模型选择 - 支持彩色展示标签并优化目录与积分交互

This commit is contained in:
ddCat
2026-09-21 11:11:10 +08:00
parent d5ff22258e
commit b8eefdad70
31 changed files with 410 additions and 63 deletions

View File

@@ -11,6 +11,16 @@ import (
"gorm.io/gorm"
)
func TestCurrentSchemaVersionMatchesMigrationPlan(t *testing.T) {
if len(schemaMigrations) == 0 {
t.Fatal("migration plan is empty")
}
latest := schemaMigrations[len(schemaMigrations)-1].version
if CurrentSchemaVersion != latest {
t.Fatalf("supported schema version %d does not match latest migration %d", CurrentSchemaVersion, latest)
}
}
func TestMigrateSchemaRecordsAndValidatesVersion(t *testing.T) {
db, err := Open(Config{Driver: "sqlite", DSN: "file:migration-version?mode=memory&cache=shared"})
if err != nil {