Implement complete collection persistence with database-backed survival across server restarts

• Add full multi-table schema for collections with normalized design (collections, collection_templates, collection_items, collection_item_versions)
• Implement collection detection and processing in enhancement pipeline for .insertr-add elements
• Add template extraction and storage from existing HTML children with multi-variant support
• Enable collection reconstruction from database on server restart with proper DOM rebuilding
• Extend ContentClient interface with collection operations and full database integration
• Update enhance command to use engine.DatabaseClient for collection persistence support
This commit is contained in:
2025-09-22 18:29:58 +02:00
parent b25663f76b
commit 2315ba4750
36 changed files with 4356 additions and 46 deletions

View File

@@ -102,7 +102,7 @@ func runEnhance(cmd *cobra.Command, args []string) {
log.Fatalf("Failed to initialize database: %v", err)
}
defer database.Close()
client = content.NewDatabaseClient(database)
client = engine.NewDatabaseClient(database)
} else {
fmt.Printf("🧪 No database or API configured, using mock content\n")
client = content.NewMockClient()