sync the tree when change on db structure

This time syncing change of the db structure to the directory tree. The implementation could be improved with event handling instead (it would be a bit more elegant and easier to maintain ...)
That's all for today,
Cheers,
C.