SQL Version

John Ralls jralls at ceridwen.us
Wed Feb 2 09:50:10 EST 2011


On Feb 2, 2011, at 5:22 AM, Derek Atkins wrote:

> John Ralls <jralls at ceridwen.us> writes:
> 
>>> Any time the IV changes we have to be careful.  But if the IV has not
>>> changed then does the actual version of GnuCash matter?
>>> 
>>> Newer versions of GnuCash can certainly read older IVs and and offer the
>>> choice to open read-only or upgrade to the current IV (or potentially
>>> stay at the current IV, if the code thinks it can do so).  Older
>>> versions of GnuCash may not be able to read newer IVs, but could offer
>>> to open read-only and re-save at an older IV, but that could introduce
>>> data loss.
>>> 
>>> I still don't see why we need to tie anything to the GnuCash version?
>>> 
>> 
>> You can't really compare older (pre-aql) versions because the XML backend always writes out the entire dataset at every save. 
>> 
>> If the IV hasn't changed then we don't need to worry about it. But
>> often we find that the IV did change after the fact from user
>> testing. If we discover that there was a change from three versions
>> ago that does cause trouble, then we can change GNC_RESAVE_VERSION to
>> that and force a full resave for anything before that change. I do see
>> that there's a flaw in the current implementation, though, because it
>> updates the version id every time it saves; it should do that only for
>> a complete save.
> 
> I don't see why it matters here.  Let's say there's a change in r12345
> that effectively changes the IV but we don't notice until r12350.  So in
> r12351 we update the IV.  Why does it matter whether someone was using
> r12344, r12345, or even r12358?  None of those versions know that there
> is anything wrong.  And if you run r12351 (with the updated IV) then you
> know you need to update the database.
> 
>> We don't need to tie to the Gnucash version, it's just convenient. 
> 
> Maybe I'm being dense, but I guess still don't understand why the IV
> isn't sufficient all by itself?

The problem with databases touched between 12345 and 12351 is that they will have some records written the old way and some the new way. That's what got me started on this in the first place[1], remember?

Like I said, the Gnucash version is convenient. Everyone, even users, understands what it is. Why not use it to make the IV number?

[1] http://lists.gnucash.org/pipermail/gnucash-devel/2010-December/030322.html

Regards,
John Ralls



More information about the gnucash-devel mailing list