mirror of
https://github.com/qTox/qTox.git
synced 2024-03-22 14:00:36 +08:00
fix(history): create file_transfers table in upgrade
* bug introduced in refactor 329172321d
This commit is contained in:
parent
e9f8795197
commit
c12605db6d
|
@ -713,6 +713,18 @@ void History::dbSchemaUpgrade()
|
||||||
break; // new db is the only case where we don't incrementally upgrade through each version
|
break; // new db is the only case where we don't incrementally upgrade through each version
|
||||||
} else {
|
} else {
|
||||||
// it's a db that exists but at the first versioned schema, version 0.
|
// it's a db that exists but at the first versioned schema, version 0.
|
||||||
|
queries +=
|
||||||
|
RawDatabase::Query(QStringLiteral(
|
||||||
|
"CREATE TABLE file_transfers "
|
||||||
|
"(id INTEGER PRIMARY KEY,"
|
||||||
|
"chat_id INTEGER NOT NULL,"
|
||||||
|
"file_restart_id BLOB NOT NULL,"
|
||||||
|
"file_name BLOB NOT NULL, "
|
||||||
|
"file_path BLOB NOT NULL,"
|
||||||
|
"file_hash BLOB NOT NULL,"
|
||||||
|
"file_size INTEGER NOT NULL,"
|
||||||
|
"direction INTEGER NOT NULL,"
|
||||||
|
"file_state INTEGER NOT NULL);"));
|
||||||
queries +=
|
queries +=
|
||||||
RawDatabase::Query(QStringLiteral("ALTER TABLE history ADD file_id INTEGER;"));
|
RawDatabase::Query(QStringLiteral("ALTER TABLE history ADD file_id INTEGER;"));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user