Schema for docs
CREATE TABLE "sections" (
"id" TEXT PRIMARY KEY,
"page" TEXT,
"ref" TEXT,
"title" TEXT,
"content" TEXT,
"breadcrumbs" TEXT,
"references" TEXT
);
CREATE VIRTUAL TABLE "sections_fts" USING FTS5 (
"title", "content",
tokenize='porter',
content="sections"
);
CREATE TRIGGER "sections_ai" AFTER INSERT ON "sections" BEGIN
INSERT INTO "sections_fts" (rowid, "title", "content") VALUES (new.rowid, new."title", new."content");
END;
CREATE TRIGGER "sections_ad" AFTER DELETE ON "sections" BEGIN
INSERT INTO "sections_fts" ("sections_fts", rowid, "title", "content") VALUES('delete', old.rowid, old."title", old."content");
END;
CREATE TRIGGER "sections_au" AFTER UPDATE ON "sections" BEGIN
INSERT INTO "sections_fts" ("sections_fts", rowid, "title", "content") VALUES('delete', old.rowid, old."title", old."content");
INSERT INTO "sections_fts" (rowid, "title", "content") VALUES (new.rowid, new."title", new."content");
END