[GNC] Database Versions
Mark at Lorimark
mark at lorimarksolutions.com
Mon Sep 23 13:57:01 EDT 2024
Wow! Beautiful, thank you for the code references as well!
~mark petryk
~w:http://www.lorimarksolutions.com
On 9/23/24 12:40, John Ralls wrote:
> This applies to the SQL backend only, the XML file has no version
> information.
>
> Once you’ve populated the database the versions table should look like this:
> Gnucash|2060800
> Gnucash-Resave|19920
> accounts|1
> books|1
>
> Gnucash records the version of GnuCash that originally created the
> database. Gnucash-Resave indicates the subversion commit number from the
> original creation of the SQL schema; we’d bump that if we were to make a
> schema change so dramatic that we needed to recreate the whole database
> (we haven’t yet). The remaining records table schema versions. For those
> that aren’t 1 there will be a comment section in the respective table
> implementation file labelled Upgrade (e.g.
> https://github.com/Gnucash/gnucash/blob/63714e5e93b2091b35bbd0d28f69bce03a397d3e/libgnucash/backend/sql/gnc-transaction-sql.cpp#L459 <https://github.com/Gnucash/gnucash/blob/63714e5e93b2091b35bbd0d28f69bce03a397d3e/libgnucash/backend/sql/gnc-transaction-sql.cpp#L459>) with a brief explanation of the change; you can use git blame to find the commit for each of those lines to get to the commit which will usually provide more details about it.
>
> Regards,
> John Ralls
>
More information about the gnucash-user
mailing list