X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fcore%2Fcore.cpp;h=5dd9721030564d2eab55af658452dca3301d1fa6;hp=c7827934b847d2717fd6fc2c1dec9174c608d4ea;hb=5e5714fb2abf8feaf9cc4a27a26e86f2f9c45b30;hpb=aca3263f8f94e0d6640bdf857e71115151b85037 diff --git a/src/core/core.cpp b/src/core/core.cpp index c7827934..5dd97210 100644 --- a/src/core/core.cpp +++ b/src/core/core.cpp @@ -140,6 +140,28 @@ Core::Core() } void Core::init() { + CoreSettings cs2; + QVariantMap connectionProperties = cs2.storageSettings().toMap()["ConnectionProperties"].toMap(); + qDebug() << connectionProperties; + SqliteMigrationReader *reader = new SqliteMigrationReader(); + qDebug() << "reader:" << reader->init(); + PostgreSqlMigrationWriter *writer = new PostgreSqlMigrationWriter(); + qDebug() << "writer:" << writer->init(connectionProperties); + qDebug() << qPrintable(QString("Migrating Storage backend %1 to %2...").arg(reader->displayName(), writer->displayName())); + if(reader->migrateTo(writer)) + qDebug() << "Migration finished!"; + return; + + + + + + + + + + + CoreSettings cs; _configured = initStorage(cs.storageSettings().toMap());