chatgui: add local_nick TEXT to peers table DDL, remove ALTER TABLE hacks
This commit is contained in:
1 parent
86843693c9
commit
22db84816e
3 files changed
+4
-9
No files matched your search
@@ -250,8 +250,6 @@ QMap<quint64, QString> DbManager::getLocalNicknames(const QString& chId) const {
|
||||
|
||||
void DbManager::cleanOrphanedPeers(const QString& chId) const {
|
||||
if (!m_db) return;
|
||||
QByteArray alt = QString("ALTER TABLE \"%1\" ADD COLUMN local_nick TEXT").arg(peersTableName(chId)).toUtf8();
|
||||
sqlite3_exec(m_db, alt.constData(), nullptr, nullptr, nullptr);
|
||||
QString sql = QStringLiteral(
|
||||
"DELETE FROM \"%1\" WHERE node_id NOT IN (SELECT node_id FROM nodes)"
|
||||
).arg(peersTableName(chId));
|
||||
|
||||
Reference in new issue
Block a user