🎨 Automatically check and eliminate duplicate reference relationships Fix https://github.com/siyuan-note/siyuan/issues/9618

This commit is contained in:
Daniel 2023-11-10 11:52:46 +08:00
parent 180dce0a78
commit 3635cf6a64
No known key found for this signature in database
GPG key ID: 86211BA83DF03017

View file

@ -29,7 +29,7 @@ import (
)
func GetRefDuplicatedDefRootIDs() (ret []string) {
rows, err := query("SELECT DISTINCT def_block_root_id FROM `refs` GROUP BY def_block_id, def_block_root_id HAVING COUNT(*) > 1 LIMIT 1")
rows, err := query("SELECT DISTINCT def_block_root_id FROM `refs` GROUP BY def_block_id, def_block_root_id, block_id HAVING COUNT(*) > 1")
if nil != err {
logging.LogErrorf("sql query failed: %s", err)
return