all repos — honk @ 34e2004eac07b14b178bc52f099f03f15919ae3e

my fork of honk

more queries, more indices. index oonker
Ted Unangst tedu@tedunangst.com
Tue, 09 Jul 2019 23:45:50 -0400
commit

34e2004eac07b14b178bc52f099f03f15919ae3e

parent

0b859c69033232e8edfa7813a5c5f34def28ef2b

3 files changed, 5 insertions(+), 1 deletions(-)

jump to
M schema.sqlschema.sql

@@ -10,6 +10,7 @@

create index idx_honksxid on honks(xid); create index idx_honksconvoy on honks(convoy); create index idx_honkshonker on honks(honker); +create index idx_honksoonker on honks(oonker); create index idx_honkerxid on honkers(xid); create index idx_xonkername on xonkers(name); create index idx_zonkersname on zonkers(name);
M upgradedb.goupgradedb.go

@@ -106,6 +106,9 @@ doordie(db, "alter table users add column options text")

doordie(db, "update users set options = ''") doordie(db, "update config set value = 12 where key = 'dbversion'") case 12: + doordie(db, "create index idx_honksoonker on honks(oonker)") + doordie(db, "update config set value = 13 where key = 'dbversion'") + case 13: default: log.Fatalf("can't upgrade unknown version %d", dbversion) }
M util.goutil.go

@@ -71,7 +71,7 @@

var alreadyopendb *sql.DB var dbname = "honk.db" var stmtConfig *sql.Stmt -var myVersion = 12 +var myVersion = 13 func initdb() { schema, err := ioutil.ReadFile("schema.sql")