From: Manuel Nickschas Date: Sun, 14 Feb 2010 21:40:44 +0000 (+0100) Subject: Fix SQLite -> Postgres migration X-Git-Tag: 0.6-beta1~26 X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=commitdiff_plain;h=97dd282be4132a8107efb92c9cd42162c4f0f51d Fix SQLite -> Postgres migration --- diff --git a/src/common/network.cpp b/src/common/network.cpp index 67ebe915..d7b21496 100644 --- a/src/common/network.cpp +++ b/src/common/network.cpp @@ -574,21 +574,21 @@ void Network::setAutoIdentifyPassword(const QString &password) { } void Network::setUseSasl(bool use) { - _useSasl = use; - SYNC(ARG(use)) - emit configChanged(); + _useSasl = use; + SYNC(ARG(use)) + emit configChanged(); } void Network::setSaslAccount(const QString &account) { - _saslAccount = account; - SYNC(ARG(account)) - emit configChanged(); + _saslAccount = account; + SYNC(ARG(account)) + emit configChanged(); } void Network::setSaslPassword(const QString &password) { - _saslPassword = password; - SYNC(ARG(password)) - emit configChanged(); + _saslPassword = password; + SYNC(ARG(password)) + emit configChanged(); } void Network::setUseAutoReconnect(bool use) { diff --git a/src/core/SQL/SQLite/17/migrate_read_network.sql b/src/core/SQL/SQLite/17/migrate_read_network.sql index 1308d809..52cdc67b 100644 --- a/src/core/SQL/SQLite/17/migrate_read_network.sql +++ b/src/core/SQL/SQLite/17/migrate_read_network.sql @@ -1,5 +1,6 @@ SELECT networkid, userid, networkname, identityid, encodingcodec, decodingcodec, servercodec, userandomserver, perform, useautoidentify, autoidentifyservice, autoidentifypassword, useautoreconnect, autoreconnectinterval, autoreconnectretries, unlimitedconnectretries, - rejoinchannels, connected, usermode, awaymessage, attachperform, detachperform + rejoinchannels, connected, usermode, awaymessage, attachperform, detachperform, + usesasl, saslaccount, saslpassword FROM network diff --git a/src/core/abstractsqlstorage.h b/src/core/abstractsqlstorage.h index 89905513..0367a559 100644 --- a/src/core/abstractsqlstorage.h +++ b/src/core/abstractsqlstorage.h @@ -187,6 +187,9 @@ public: QString awaymessage; QString attachperform; QString detachperform; + bool usesasl; + QString saslaccount; + QString saslpassword; }; struct BufferMO { diff --git a/src/core/postgresqlstorage.cpp b/src/core/postgresqlstorage.cpp index c942b4a7..0ae2d6d2 100644 --- a/src/core/postgresqlstorage.cpp +++ b/src/core/postgresqlstorage.cpp @@ -1660,6 +1660,9 @@ bool PostgreSqlMigrationWriter::writeMo(const NetworkMO &network) { bindValue(19, network.awaymessage); bindValue(20, network.attachperform); bindValue(21, network.detachperform); + bindValue(22, network.usesasl); + bindValue(23, network.saslaccount); + bindValue(24, network.saslpassword); return exec(); } diff --git a/src/core/sqlitestorage.cpp b/src/core/sqlitestorage.cpp index c962e8f6..5f36e83e 100644 --- a/src/core/sqlitestorage.cpp +++ b/src/core/sqlitestorage.cpp @@ -1736,6 +1736,9 @@ bool SqliteMigrationReader::readMo(NetworkMO &network) { network.awaymessage = value(19).toString(); network.attachperform = value(20).toString(); network.detachperform = value(21).toString(); + network.usesasl = value(22).toInt() == 1 ? true : false; + network.saslaccount = value(23).toString(); + network.saslpassword = value(24).toString(); return true; }