going to need userid in zonkers table too
Ted Unangst tedu@tedunangst.com
Fri, 19 Apr 2019 22:34:39 -0400
2 files changed,
2 insertions(+),
2 deletions(-)
M
schema.sql
→
schema.sql
@@ -4,7 +4,7 @@ create table donks (honkid integer, fileid integer);
create table files(fileid integer primary key, xid text, name text, url text, media text, content blob); create table honkers (honkerid integer primary key, userid integer, name text, xid text, flavor text, pubkey text); create table xonkers (xonkerid integer primary key, xid text, ibox text, obox text, sbox text, pubkey text); -create table zonkers (zonkerid integer primary key, name text, wherefore text); +create table zonkers (zonkerid integer primary key, userid integer, name text, wherefore text); create table doovers(dooverid integer primary key, dt text, tries integer, username text, rcpt text, msg blob); create index idx_honksxid on honks(xid);
M
upgradedb.go
→
upgradedb.go
@@ -49,7 +49,7 @@ doordie(db, "create table xonkers (xonkerid integer primary key, xid text, ibox text, obox text, sbox text, pubkey text)")
doordie(db, "insert into xonkers (xid, ibox, obox, sbox, pubkey) select xid, '', '', '', pubkey from honkers where flavor = 'key'") doordie(db, "delete from honkers where flavor = 'key'") doordie(db, "create index idx_xonkerxid on xonkers(xid)") - doordie(db, "create table zonkers (zonkerid integer primary key, name text, wherefore text)") + doordie(db, "create table zonkers (zonkerid integer primary key, userid integer, name text, wherefore text)") doordie(db, "create index idx_zonkersname on zonkers(name)") doordie(db, "update config set value = 3 where key = 'dbversion'") fallthrough