I got today the update from 5.13 to 5.1.92 on my Gentoo PC. Unfortunately when I start it I get the following error: Error in function QMap<QString, MyMoneyPayee> MyMoneyStorageSql::fetchPayees(const QStringList&, bool) const : reading Payee Driver = QMYSQL, Host = 192.168.0.12, User = marco, Database = KMyMoney-CHF Driver Error: Database Error No : Text: Error type 0 Executed: SELECT kmmPayees.id AS id, kmmPayees.name AS name, kmmPayees.reference AS reference, kmmPayees.email AS email, kmmPayees.addressStreet AS addressStreet, kmmPayees.addressCity AS addressCity, kmmPayees.addressZipcode AS addressZipcode, kmmPayees.addressState AS addressState, kmmPayees.telephone AS telephone, kmmPayees.notes AS notes, kmmPayees.defaultAccountId AS defaultAccountId, kmmPayees.matchData AS matchData, kmmPayees.matchIgnoreCase AS matchIgnoreCase, kmmPayees.matchKeys AS matchKeys, kmmPayeesPayeeIdentifier.identifierId AS identId, kmmPayees.idPattern AS idPattern, kmmPayees.urlTemplate AS urlTemplate FROM ( SELECT * FROM kmmPayees ) kmmPayees LEFT OUTER JOIN kmmPayeesPayeeIdentifier ON kmmPayees.Id = kmmPayeesPayeeIdentifier.payeeId ORDER BY kmmPayees.id, kmmPayeesPayeeIdentifier.userOrder; Query error No 1054: Unknown column 'kmmPayees.idPattern' in 'field list' QMYSQL: Unable to execute query Error type 2 /var/tmp/portage/app-office/kmymoney-5.1.92_p20250306/work/kmymoney-17859b4f0b2a654c11e8e209fdc7ea097c7f4ea5/kmymoney/plugins/sql/mymoneystoragesql.cpp:1338 Dismissing the error window lead to a fresh (empty) KMyMoney; therefore I cannot access my accounting.
A few more details to help focus on the cause: was this an upgrade from 5.1.3? What version of what database are you using? (mariadb, mysql, ...) It shouldn't matter, but just in case. Can you open the database with command-line sql? If so, what columns do exist in the kmmPayees table? I am also on Gentoo, but my mariadb database is a bit scrambled and it will take me some time before I can directly try to replicate the issue.
llo, A few notes as requested: it was an upgrade from 5.1.3; the DB is MariaDB 5.5.68 (it is on a NAS, so I don't think I can upgrade it outside NAS firmware updates); here the columns in kmmPayees: id name reference email addressStreet addressCity addressZipcode addressState telephone notes defaultAccountId matchData matchIgnoreCase matchKeys Best regards.
The field it can't find was added four months ago, but only in master branch, not the 5.1 branch, which is why it is not in your data. In the short term, using any version of KMyMoney from the 5.1 branch should be able to read your existing database. You can either dig up the 5.1.3 ebuild from git, or use the 5.1.3 appimage I mentioned above. Separately, we'll have to figure out why the new version didn't recognize that your database needed to be updated, and get that code added.
(In reply to Jack from comment #3) > The field it can't find was added four months ago, but only in master > branch, not the 5.1 branch, which is why it is not in your data. In the > short term, using any version of KMyMoney from the 5.1 branch should be able > to read your existing database. You can either dig up the 5.1.3 ebuild from > git, or use the 5.1.3 appimage I mentioned above. > Separately, we'll have to figure out why the new version didn't recognize > that your database needed to be updated, and get that code added. OK, thanks. Should I also open a bug report on Gentoo? Since 5.1.92 is now the only version on their tree, other may have the same problem too and therefore they should revert back to 5.1.3 until migrating-version is available.
Unfortunately, the available appimage kmymoney-5.1-3218-linux-gcc-x86_64.AppImage seems to have been created without the SQL plugin. Sqlcipher is present, but not sql.
I think that would be a good idea - but to re-add 5.1.3 as stable, and leave 5.1.92 as testing. Including a link to this bug might also help them decide how to handle it.
Done: https://bugs.gentoo.org/951486
It appears commit 4c86b5b1 (Adding payee-based links in the memo field) added two columns to the kmmPayees table, but no way to add the columns to existing databases, such as would be saved by any version from the 5.1 branch, including the released 5.1.3. This was only discovered because Gentoo just replaced 5.1.3 with 5.1.92 as the only available stable version. In addition, (as noted in Comment #5) the available 5.1 appimage seems to have Sqlcypher as the ONLY available sql back end. For now, it appears the only workaround would be to use 5.1.3 to save the database as an xml or kmy file, and then in 5.1.92 (or other version from master) re-save to the database.
(In reply to Jack from comment #8) > It appears commit 4c86b5b1 (Adding payee-based links in the memo field) > added two columns to the kmmPayees table, but no way to add the columns to > existing databases Is there a hook in the sql storage implementation to intercept the case that the database to be loaded is outdated and to be able to perform corresponding updates afterwards ?
A possibly relevant merge request was started @ https://invent.kde.org/office/kmymoney/-/merge_requests/264
Git commit 17659e3283753e5ad77fb8023452cf48811c585c by Ralf Habacker. Committed on 18/03/2025 at 07:59. Pushed by habacker into branch 'master'. Add missing sql database upgrade for kmmpayees table With this commit the kmymoney database version has been updated to 13. FIXED-IN:5.1.94 M +1 -1 kmymoney/plugins/sql/mymoneydbdef.cpp M +41 -0 kmymoney/plugins/sql/mymoneystoragesql_p.h https://invent.kde.org/office/kmymoney/-/commit/17659e3283753e5ad77fb8023452cf48811c585c