> On Okt. 29, 2014, 2:59 nachm., Cristian Oneț wrote: > > Could the fact that writeFileInfo() is now used be causing this bug? > > https://bugs.kde.org/show_bug.cgi?id=339103 > > Cristian Oneț wrote: > Soory, I just noticed your comment > https://bugs.kde.org/show_bug.cgi?id=339103#c9 are you saying this would > actually fix that bug? By looking at the upgradeToV7() I don't really > understand why the tags code is there in the first place. Since we didn't had > tags before there should be nothing to upgrade. > > Christian David wrote: > I have just began to understand the update system. But I know: > upgradeToV7() is needed to add the hiTagId column to kmmFileInfo. Actually > you are right: the line ```m_tags = getRecCount("kmmTags");``` should be > equivalent to ```m_tags = 0;```. > > The upgrade process has some other issues — some of them are caused by > calling readFileInfo() and writeFileInfo() in wrong places. Bug 339103 could > be caused by this as well. But I do not think it is solved with this review > request. > > Btw: using ```getRecCount( some-table )``` to get the highest record > number will fail in most cases. It will return a already used id if the user > ever removed a row from "some-table". Or am I wrong here?
No answer for a month. What do we do now? - Christian ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://git.reviewboard.kde.org/r/120499/#review69451 ----------------------------------------------------------- On Okt. 5, 2014, 1:53 nachm., Christian David wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://git.reviewboard.kde.org/r/120499/ > ----------------------------------------------------------- > > (Updated Okt. 5, 2014, 1:53 nachm.) > > > Review request for KMymoney. > > > Repository: kmymoney > > > Description > ------- > > MyMoneyStorageSql::upgradeToV7() does not use readFileInfo() and > writeFileInfo() anymore. > > This should prevent an issue if this metod is used to upgrade the > database to a version higher than 7 as readFileInfo() and > writeFileInfo() assume a database of the most recent version. This > will cause errors (=> crash) if a column in kmmFileInfo was > renamed or added between version 7 and the final version. > > KMyMoney should still crash if you upgradeToV1() is used. > > > Diffs > ----- > > kmymoney/mymoney/storage/mymoneystoragesql.cpp > 0fa790d435bc978279038893b945de31811f34f1 > > Diff: https://git.reviewboard.kde.org/r/120499/diff/ > > > Testing > ------- > > Opened an sqlite database which was created with KMyMoney 4.5.3, database > version 6. > The upgrade still worked and kmmFileInfo was still filled with correct data. > > > Thanks, > > Christian David > >
_______________________________________________ KMyMoney-devel mailing list KMyMoney-devel@kde.org https://mail.kde.org/mailman/listinfo/kmymoney-devel