all repos — honk @ cb63e31a9375376cd52d06639c40ce073fc08a62

my fork of honk

prepare to save id for follow requests
Ted Unangst tedu@tedunangst.com
Mon, 10 Aug 2020 15:15:11 -0400
commit

cb63e31a9375376cd52d06639c40ce073fc08a62

parent

5052a3e0a3e58c83e671a67b798fc6563e233b08

3 files changed, 8 insertions(+), 3 deletions(-)

jump to
M schema.goschema.go

@@ -6,7 +6,7 @@ create table honks (honkid integer primary key, userid integer, what text, honker text, xid text, rid text, dt text, url text, audience text, noise text, convoy text, whofore integer, format text, precis text, oonker text, flags integer);

create table chonks (chonkid integer primary key, userid integer, xid text, who txt, target text, dt text, noise text, format text); create table donks (honkid integer, chonkid integer, fileid integer); create table filemeta (fileid integer primary key, xid text, name text, description text, url text, media text, local integer); -create table honkers (honkerid integer primary key, userid integer, name text, xid text, flavor text, combos text, owner text, meta text); +create table honkers (honkerid integer primary key, userid integer, name text, xid text, flavor text, combos text, owner text, meta text, folxid text); create table xonkers (xonkerid integer primary key, name text, info text, flavor text, dt 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, userid integer, rcpt text, msg blob);
M schema.sqlschema.sql

@@ -3,7 +3,7 @@ create table honks (honkid integer primary key, userid integer, what text, honker text, xid text, rid text, dt text, url text, audience text, noise text, convoy text, whofore integer, format text, precis text, oonker text, flags integer);

create table chonks (chonkid integer primary key, userid integer, xid text, who txt, target text, dt text, noise text, format text); create table donks (honkid integer, chonkid integer, fileid integer); create table filemeta (fileid integer primary key, xid text, name text, description text, url text, media text, local integer); -create table honkers (honkerid integer primary key, userid integer, name text, xid text, flavor text, combos text, owner text, meta text); +create table honkers (honkerid integer primary key, userid integer, name text, xid text, flavor text, combos text, owner text, meta text, folxid text); create table xonkers (xonkerid integer primary key, name text, info text, flavor text, dt 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, userid integer, rcpt text, msg blob);
M upgradedb.goupgradedb.go

@@ -23,7 +23,7 @@ "strings"

"time" ) -var myVersion = 36 +var myVersion = 37 func doordie(db *sql.DB, s string, args ...interface{}) { _, err := db.Exec(s, args...)

@@ -148,6 +148,11 @@ doordie(db, "create index idx_donkschonk on donks(chonkid)")

doordie(db, "update config set value = 36 where key = 'dbversion'") fallthrough case 36: + doordie(db, "alter table honkers add column folxid text") + doordie(db, "update honkers set folxid = 'lostdata'") + doordie(db, "update config set value = 37 where key = 'dbversion'") + fallthrough + case 37: default: log.Fatalf("can't upgrade unknown version %d", dbversion)