butnotthose:=" and convoy not in (select name from zonkers where userid = ? and wherefore = 'zonvoy' order by zonkerid desc limit 100)"
stmtOneXonk=preparetodie(db,selecthonks+"where honks.userid = ? and xid = ?")
stmtPublicHonks=preparetodie(db,selecthonks+"where honker = '' and dt > ?"+limit)
stmtUserHonks=preparetodie(db,selecthonks+"where honker = '' and username = ? and dt > ?"+limit)
stmtPublicHonks=preparetodie(db,selecthonks+"where whofore = 2 and dt > ?"+limit)
stmtUserHonks=preparetodie(db,selecthonks+"where whofore = 2 and username = ? and dt > ?"+limit)
stmtHonksForUser=preparetodie(db,selecthonks+"where honks.userid = ? and dt > ? and honker in (select xid from honkers where userid = ? and flavor = 'sub' and combos not like '% - %')"+butnotthose+limit)
stmtHonksForMe=preparetodie(db,selecthonks+"where honks.userid = ? and dt > ? and whofore = 1"+butnotthose+limit)
stmtHonksByHonker=preparetodie(db,selecthonks+"join honkers on honkers.xid = honks.honker where honks.userid = ? and honkers.name = ?"+butnotthose+limit)
stmtHonksByCombo=preparetodie(db,selecthonks+"join honkers on honkers.xid = honks.honker where honks.userid = ? and honkers.combos like ?"+butnotthose+limit)
stmtHonksByConvoy=preparetodie(db,selecthonks+"where (honks.userid = ? or honker = '') and convoy = ?"+limit)
stmtHonksByConvoy=preparetodie(db,selecthonks+"where (honks.userid = ? or whofore = 2) and convoy = ?"+limit)
doordie(db,fmt.Sprintf("update honks set xid = '%s/h/' || xid, honker = ?, whofore = 2 where userid = ? and honker = '' and (what = 'honk' or what = 'bonk')",h),h,u.UserID)
doordie(db,"update honks set honker = ?, whofore = 2 where userid = ? and honker = '' and what = 'bonk'",h,u.UserID)
}
doordie(db,"update config set value = 8 where key = 'dbversion'")
case8:
default:
log.Fatalf("can't upgrade unknown version %d",dbversion)