[Kmymoney-devel] missing subject

Christian Dávid christian-david at web.de
Fri Oct 3 10:29:47 UTC 2014


Hi Fernando,

finally I want to finish the online banking stuff for the database backend. So I 
have more questions…

Am Sonntag, 21. September 2014, 15:33:46 schrieb Fernando Vilas:
> > I even think, this behavior will prevent the upgrades to v1, and v7 as
> > they
> > call readFileInfo() and new columns were created in that versions. If you
> > have to upgrade more versions than just on (vN -> vM | m >= n+2) it will
> > even fail if you start with any version before v7 (= all possible update
> > processes).
> >
> > Actually the test databases which I just created (using master branch)
> > identifies itself as version 6 but it should be v7. This indicates a bug
> > in
> > the upgrade process.
> >
> > _ Solution _ 
> >
> > I would recommend not to use readFileInfo() and writeFileInfo() in any
> > upgrade methods anymore and just call writeFileInfo() at the end of the
> > upgrade process. Also the m_hi…Id vars need to be set somewhere.
> 
> That sounds reasonable. The system was designed to make upgrades easy, but 
> there are always cases you did not consider. I do not remember us
> considering  removing columns, just adding/changing them, so this is new
> territory.

I think this is a misunderstanding. To solve that: Where/when exactly are 
columns added to the database? I cannot find any piece of code that triggers 
that :(

The errors I got are not caused by removed columns (I do not drop any 
column) but it is caused by columns which are going to be created (well, 
actually won't be created, because KMyMoney crashes first…).

> > How is the database created if you create a new database from scratch:
> > 1) Is the most recent database version created directly? Or
> > 2) do you create a database of version 0 and then call all upgrade
> > methods?
> 
> It should be option 1: just creating the database using the current state
> of  affairs for tables/views. That definitely simplifies things, but can
> make testing the upgrade functions non-trivial.

Has somebody a database (with test data) from version 0? I can just compile 
KMyMoney 4.5, all earlier versions do not compile on my system anymore. Or a 
database of any other version (e.g. 6.0)? That could help me testing.

We should create some database files and .xml files for each version and save 
them for later test of the upgrade routines.

Greetings
Christian


More information about the KMyMoney-devel mailing list