prepare to save id for follow requests

Ted Unangst 4 years ago
parent 154e8babed
commit 8ab4a71f97

@ -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);

@ -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);

@ -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)

Loading…
Cancel
Save