shared: create.sql: Fix format
The qt sqlite3 driver only accepts a single statement per exec(). We can't split by ; due to the trigger statements. Thus, the pragmatic and dirty solution is to simply put a query per line.
这个提交包含在:
父节点
604d45afb2
当前提交
414d53e59a
@ -1,14 +1,6 @@
|
||||
CREATE TABLE file(id INTEGER PRIMARY KEY, path varchar(4096) UNIQUE, mtime integer, size integer, filetype char(1));
|
||||
CREATE TABLE content(id INTEGER PRIMARY KEY, fileid INTEGER REFERENCES file (id) ON DELETE CASCADE, page integer, content text);
|
||||
CREATE VIRTUAL TABLE content_fts USING fts5(content, content='content', content_rowid='id')
|
||||
/* content_fts(content) */;
|
||||
CREATE TRIGGER contents_ai AFTER INSERT ON content BEGIN
|
||||
INSERT INTO content_fts(rowid, content) VALUES (new.id, new.content);
|
||||
END;
|
||||
CREATE TRIGGER contents_ad AFTER DELETE ON content BEGIN
|
||||
INSERT INTO content_fts(content_fts, rowid, content) VALUES('delete', old.id, old.content);
|
||||
END;
|
||||
CREATE TRIGGER contents_au AFTER UPDATE ON content BEGIN
|
||||
INSERT INTO content_fts(content_fts, rowid, content) VALUES('delete', old.id, old.content);
|
||||
INSERT INTO content_fts(rowid, content) VALUES (new.id, new.content);
|
||||
END;
|
||||
CREATE VIRTUAL TABLE content_fts USING fts5(content, content='content', content_rowid='id');
|
||||
CREATE TRIGGER contents_ai AFTER INSERT ON content BEGIN INSERT INTO content_fts(rowid, content) VALUES (new.id, new.content); END;
|
||||
CREATE TRIGGER contents_ad AFTER DELETE ON content BEGIN INSERT INTO content_fts(content_fts, rowid, content) VALUES('delete', old.id, old.content); END;
|
||||
CREATE TRIGGER contents_au AFTER UPDATE ON content BEGIN INSERT INTO content_fts(content_fts, rowid, content) VALUES('delete', old.id, old.content); INSERT INTO content_fts(rowid, content) VALUES (new.id, new.content); END;
|
||||
|
正在加载...
在新工单中引用
屏蔽一个用户