Repair errors saved for messages

This commit is contained in:
Hocuri
2020-06-06 17:05:24 +02:00
parent 8350729cbb
commit f0837cfa73
4 changed files with 36 additions and 27 deletions

View File

@@ -779,6 +779,7 @@ async fn open(
timestamp INTEGER DEFAULT 0, \
type INTEGER DEFAULT 0, \
state INTEGER DEFAULT 0, \
error TEXT DEFAULT '', \
msgrmsg INTEGER DEFAULT 1, \
bytes INTEGER DEFAULT 0, \
txt TEXT DEFAULT '', \
@@ -1241,6 +1242,15 @@ async fn open(
.await?;
sql.set_raw_config_int(context, "dbversion", 63).await?;
}
if dbversion < 64 {
info!(context, "[migration] v63");
sql.execute(
"ALTER TABLE chats ADD COLUMN error TEXT DEFAULT '';",
paramsv![],
)
.await?;
sql.set_raw_config_int(context, "dbversion", 64).await?;
}
// (2) updates that require high-level objects
// (the structure is complete now and all objects are usable)