[Kmymoney-devel] missing subject
fvilas at iname.com
Sun Aug 10 23:01:37 UTC 2014
Message - ID: <1436202.ivb9Oc2hBi at asus-k53e>
User - Agent: KMail/4.98 pre (Linux/3.15.3; KDE/5.1.0; x86_64; ; )
MIME - Version: 1.0
Content - Transfer - Encoding: quoted-printable
Content - Type: text/plain; charset="iso-8859-1"
On Sunday, August 10, 2014 01:24:08 PM Christian D=E1vid wrote:
> Hi all,
> Hi Fernando,
> as you can see from  I started to familiarize myself with the data=
> Now I added a new column to kmmFieldInfo in MyMoneyDbDef::FileInfo(vo=
> appendField(MyMoneyDbIntColumn("hiOnlineJobId", MyMoneyDbIntColumn::B=
> UNSIGNED, false, false, 8));
> First question: is that correct?
Yes, that is correct. It should just add it on the next upgrade. You wi=
probably also have to update the version.
> If I open KMyMoney with a sql-database it crashes because it tries to=
> the new column "hiOnlineJobId" (or even tags if the version is 6) bef=
> updated the database.
> I did some investigation and noticed that the upgradeToVx() methods c=
> readFileInfo() and writeFileInfo() quite often. But these methods use=
> m_db.m_tables["kmmFileInfo"].selectAllString(). This leads to the req=
> for non-existing columns (-> exception -> crash).
> Have I done something wrong?
Those methods are intended for a few of the more complex updates to the=
structure we made in the past. I think just rolling the version number =
fix it, but I need to look harder at it.
> Btw: what is fixLevel in kmmFileInfo used for?
If I remember correctly, this current problem is exactly it. Check out=20=
upgradeToV2() for a small example. It calls alterTable() on a single ta=
force the code to deal with the new columns.
> Have a nice day!
> P.S.: I think we have to rethink how the hole storage system should w=
> For beginners like me it is a lot of work to understand it, way to mu=
> you remember which tasks they solve. There are to many hacks, abstrac=
> and methods which do nothing else then calling another method without=
> changes. I feel like being in a pinball machine :( But especially ope=
> source projects which are based on the work of volunteers must make i=
> for new contributors to help. If I had known what work is waiting for=
> had never started contributing.
I agree, but I have not had a chance to tackle this. Thomas says he has=
idea to clean up the whole storage system by going to an in-memory SQLi=
database that gets dumped to disk when the user presses "Save". I suspe=
schedule has been just as chaotic, but he may be able to provide more i=
to you in case you want to address this.
fvilas at iname.com
More information about the KMyMoney-devel