Summary: | Error in function QMap<QString, MyMoneyPayee> MyMoneyStorageSql::fetchPayees(const QStringList&, bool) const : reading Payee | ||
---|---|---|---|
Product: | [Applications] kmymoney | Reporter: | Marco Di Fresco <marco.difresco> |
Component: | database | Assignee: | KMyMoney Devel Mailing List <kmymoney-devel> |
Status: | RESOLVED FIXED | ||
Severity: | grave | CC: | ostroffjh, ralf.habacker |
Priority: | NOR | ||
Version: | 5.1.92 | ||
Target Milestone: | --- | ||
Platform: | Gentoo Packages | ||
OS: | Linux | ||
Latest Commit: | https://invent.kde.org/office/kmymoney/-/commit/17659e3283753e5ad77fb8023452cf48811c585c | Version Fixed In: | 5.1.94 |
Sentry Crash Report: |
Description
Marco Di Fresco
2025-03-16 16:12:13 UTC
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. 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 |