aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdam Mathes <adam@trenchant.org>2018-06-16 12:23:12 -0700
committerAdam Mathes <adam@trenchant.org>2018-06-16 12:23:12 -0700
commita1678e1193a888d7c42b9657d69acf444345e80a (patch)
treeb26cb54129b3baceb8077e04fced1766ede26774
parenta89442e28240af4a4032bcc08e450c7c2a426631 (diff)
downloadneko-a1678e1193a888d7c42b9657d69acf444345e80a.tar.gz
neko-a1678e1193a888d7c42b9657d69acf444345e80a.tar.bz2
neko-a1678e1193a888d7c42b9657d69acf444345e80a.zip
fix sqlite init
-rw-r--r--sqlite.init.sql13
1 files changed, 6 insertions, 7 deletions
diff --git a/sqlite.init.sql b/sqlite.init.sql
index 411d152..8992483 100644
--- a/sqlite.init.sql
+++ b/sqlite.init.sql
@@ -35,13 +35,12 @@ INSERT INTO fts_item(fts_item) VALUES('rebuild');
CREATE TRIGGER item_bu BEFORE UPDATE ON item BEGIN
DELETE FROM fts_item WHERE docid=old.rowid;
END;
-CREATE TRIGGER t2_bd BEFORE DELETE ON t2 BEGIN
- DELETE FROM t3 WHERE docid=old.rowid;
+CREATE TRIGGER item_bd BEFORE DELETE ON item BEGIN
+ DELETE FROM fts_item WHERE docid=old.rowid;
END;
-
-CREATE TRIGGER t2_au AFTER UPDATE ON t2 BEGIN
- INSERT INTO t3(docid, b, c) VALUES(new.rowid, new.b, new.c);
+CREATE TRIGGER item_au AFTER UPDATE ON item BEGIN
+ INSERT INTO fts_item(docid, title, url, description) VALUES(new.rowid, new.title, new.url, new.description);
END;
-CREATE TRIGGER t2_ai AFTER INSERT ON t2 BEGIN
- INSERT INTO t3(docid, b, c) VALUES(new.rowid, new.b, new.c);
+CREATE TRIGGER item_ai AFTER INSERT ON item BEGIN
+ INSERT INTO fts_item(docid, title, url, description) VALUES(new.rowid, new.title, new.url, new.description);
END;