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:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user