feat(skills): 技能管理 - 支持后台维护一级分类 (#694)

Co-authored-by: ddcat666 <26564566+ddcat666@users.noreply.github.com>
This commit is contained in:
Catlaxy AIandddcat666 authored and GitHub committed 2026-10-06 09:28:03 +08:00
1 parent fb4af9bd34
commit fe2b892f1f
29 files changed
+579 -37

No files matched your search

@@ -0,0 +1,15 @@
package database
import (
"gorm.io/gorm"
"gorm.io/gorm/clause"
"infinite-canvas/backend/internal/model"
)
func migrateSkillCurationRoots(tx *gorm.DB) error {
if err := tx.AutoMigrate(&model.SkillCurationRoot{}, &model.SkillCurationRootAssignment{}); err != nil {
return err
}
roots := model.DefaultSkillCurationRoots()
return tx.Clauses(clause.OnConflict{DoNothing: true}).Create(&roots).Error
}