These page contains details for the implementation of the comments section for BookStack. Issue is [here] (https://github.com/ssddanbrown/BookStack/issues/47).
The database schema will be a simple tree based schema.
Reviewed various tree based schema's structure for SQL described here http://mikehillyer.com/articles/managing-hierarchical-data-in-mysql/
After analyzing the various schema structures, I've finally decided to go ahead with the Adjacency List based on its simplicity. Following will be the schema structure -