prepare to save id for follow requests

This commit is contained in:
Ted Unangst 2020-08-10 15:15:11 -04:00
parent 530fc71c0f
commit 497c9c15e7
3 changed files with 8 additions and 3 deletions

View File

@ -6,7 +6,7 @@ create table honks (honkid integer primary key, userid integer, what text, honke
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);

View File

@ -3,7 +3,7 @@ create table honks (honkid integer primary key, userid integer, what text, honke
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);

View File

@ -23,7 +23,7 @@ import (
"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 @@ func upgradedb() {
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)