🎨 Add the parent_id index for table blocks https://github.com/siyuan-note/siyuan/issues/12054
This commit is contained in:
parent
37c80cc770
commit
b763b4d482
1 changed files with 5 additions and 0 deletions
|
@ -135,6 +135,11 @@ func initDBTables() {
|
|||
logging.LogFatalf(logging.ExitCodeReadOnlyDatabase, "create index [idx_blocks_id] failed: %s", err)
|
||||
}
|
||||
|
||||
_, err = db.Exec("CREATE INDEX idx_blocks_parent_id ON blocks(parent_id)")
|
||||
if nil != err {
|
||||
logging.LogFatalf(logging.ExitCodeReadOnlyDatabase, "create index [idx_blocks_parent_id] failed: %s", err)
|
||||
}
|
||||
|
||||
_, err = db.Exec("CREATE INDEX idx_blocks_root_id ON blocks(root_id)")
|
||||
if nil != err {
|
||||
logging.LogFatalf(logging.ExitCodeReadOnlyDatabase, "create index [idx_blocks_root_id] failed: %s", err)
|
||||
|
|
Loading…
Add table
Reference in a new issue