mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-20 08:30:12 +01:00
🎨 Add index idx_attributes_block_id https://ld246.com/article/1742827508465
This commit is contained in:
parent
44738e34c0
commit
37d358cd52
1 changed files with 4 additions and 0 deletions
|
|
@ -197,6 +197,10 @@ func initDBTables() {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
logging.LogFatalf(logging.ExitCodeReadOnlyDatabase, "create table [attributes] failed: %s", err)
|
logging.LogFatalf(logging.ExitCodeReadOnlyDatabase, "create table [attributes] failed: %s", err)
|
||||||
}
|
}
|
||||||
|
_, err = db.Exec("CREATE INDEX idx_attributes_block_id ON attributes(block_id)")
|
||||||
|
if err != nil {
|
||||||
|
logging.LogFatalf(logging.ExitCodeReadOnlyDatabase, "create index [idx_attributes_block_id] failed: %s", err)
|
||||||
|
}
|
||||||
_, err = db.Exec("CREATE INDEX idx_attributes_root_id ON attributes(root_id)")
|
_, err = db.Exec("CREATE INDEX idx_attributes_root_id ON attributes(root_id)")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
logging.LogFatalf(logging.ExitCodeReadOnlyDatabase, "create index [idx_attributes_root_id] failed: %s", err)
|
logging.LogFatalf(logging.ExitCodeReadOnlyDatabase, "create index [idx_attributes_root_id] failed: %s", err)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue