An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作
TypeScript agentic-aiai-agentknowledge-baselocal-firstmarkdownmcpmindmapnote-takingself-hostedsiyuanworkspace
// SiYuan - https://github.com/siyuan-note/siyuan
// Copyright (c) 2020-present, b3log.org
// SPDX-License-Identifier: AGPL-3.0-or-later
//go:build fts5
package sql
import "testing"
func TestFileAnnotationRefIndexDatabaseInitialization(t *testing.T) {
for _, encrypted := range []bool{false, true} {
database := newDeletePathTestDB(t, encrypted)
var count int
if err := database.QueryRow("SELECT COUNT(*) FROM sqlite_master WHERE type = 'index' AND name = 'idx_file_annotation_refs_annotation_id'").Scan(&count); err != nil {
t.Fatal(err)
}
if count != 1 {
t.Fatalf("encrypted=%v: annotation reference index missing", encrypted)
}
}
}