feat(skills): 技能库 - 内置技能目录迁移为 Markdown 包
This commit is contained in:
1 parent
eb43d3754f
commit
1080b22196
107 files changed
+15402
-3667
No files matched your search
@@ -11,7 +11,7 @@ import (
|
||||
"gorm.io/gorm"
|
||||
)
|
||||
|
||||
const CurrentSchemaVersion int64 = 38
|
||||
const CurrentSchemaVersion int64 = 40
|
||||
|
||||
const baselineSchemaChecksum = "sha256:open-ai-canvas-schema-v1-20260830"
|
||||
const schemaMigrationAppliedAtIndexChecksum = "sha256:schema-migrations-applied-at-index-v2-20260830"
|
||||
@@ -26,6 +26,8 @@ const authNotificationsChecksum = "sha256:auth-notifications-v35-20260924"
|
||||
const cloudAgentGeminiCacheChecksum = "sha256:cloud-agent-gemini-cache-v36-20260924"
|
||||
const cloudAgentGeminiCacheIdentityChecksum = "sha256:cloud-agent-gemini-cache-identity-v37-20260925"
|
||||
const prefixedIDSequenceReconcileChecksum = "sha256:prefixed-id-sequence-reconcile-v38-20260926"
|
||||
const skillLibraryCategoriesChecksum = "sha256:skill-library-categories-v39-20260926"
|
||||
const builtinSkillTombstonesChecksum = "sha256:builtin-skill-tombstones-v40-20260926"
|
||||
|
||||
const postgresSchemaMigrationLockID int64 = 73123910420260830
|
||||
|
||||
@@ -127,6 +129,12 @@ var schemaMigrations = []migration{
|
||||
}},
|
||||
{version: 37, name: "cloud_agent_gemini_cache_identity", checksum: cloudAgentGeminiCacheIdentityChecksum, apply: migrateCloudAgentGeminiCacheIdentity},
|
||||
{version: 38, name: "prefixed_id_sequence_reconcile", checksum: prefixedIDSequenceReconcileChecksum, apply: migratePrefixedIDSequenceReconcile},
|
||||
{version: 39, name: "skill_library_categories", checksum: skillLibraryCategoriesChecksum, apply: func(tx *gorm.DB) error {
|
||||
return tx.AutoMigrate(&model.SkillLibraryCategory{}, &model.UserSkillState{})
|
||||
}},
|
||||
{version: 40, name: "builtin_skill_tombstones", checksum: builtinSkillTombstonesChecksum, apply: func(tx *gorm.DB) error {
|
||||
return tx.AutoMigrate(&model.BuiltinSkillTombstone{})
|
||||
}},
|
||||
}
|
||||
|
||||
func migratePrefixedIDSequenceReconcile(tx *gorm.DB) error {
|
||||
|
||||
@@ -65,9 +65,11 @@ func Models() []any {
|
||||
&model.StorageLocation{},
|
||||
&model.UserDailyUploadUsage{},
|
||||
&model.Skill{},
|
||||
&model.SkillLibraryCategory{},
|
||||
&model.SkillVersion{},
|
||||
&model.SkillFile{},
|
||||
&model.UserSkillState{},
|
||||
&model.BuiltinSkillTombstone{},
|
||||
&model.Tool{},
|
||||
&model.ToolFavorite{},
|
||||
&model.Resource{},
|
||||
|
||||
Reference in new issue
Block a user