GnuCash 2.6.3 does not automatically create root account?

John Ralls jralls at ceridwen.us
Fri Sep 19 18:29:03 EDT 2014


On Sep 19, 2014, at 11:34 AM, James Nylen <jnylen+gnucash at gmail.com> wrote:

> I created a new book in a blank MySQL database, and my version of GnuCash
> did not automatically create the root account in the database.  Is this a
> known issue?  A new bug?  Here's my version info:
> 
> james at computron ~ $ gnucash --version
> GnuCash 2.6.3
> This copy was built from rev 4e4a032+ on 2014-08-03.
> 
> I need the root account to exist so that I can run reports against the
> account tree outside of GnuCash, so I added it to the `accounts` table with
> the following query (`guid` found by looking at `parent_guid` of my
> top-level accounts):
> 
> INSERT INTO `accounts` (`guid`, `name`, `account_type`, `commodity_guid`,
> `commodity_scu`, `non_std_scu`, `parent_guid`, `code`, `description`,
> `hidden`, `placeholder`) VALUES ('a3d7e8115b4631931e93047ca9dfba13', 'Root
> Account', 'ROOT', NULL, '0', '0', NULL, '', '', '0', '0’);

There’s no need to cross-post, and this isn’t an appropriate question for gnucash-devel.

That’s odd. I just tested by saving to a MySql database and then:

mysql> select guid, name from accounts where account_type = 'ROOT';
+----------------------------------+---------------+
| guid                             | name          |
+----------------------------------+---------------+
| 5c6c118a0413e93b147309bda39493c2 | Root Account  |
| 7e1412d16f73201a5dddfbf6b884632d | Template Root |
+----------------------------------+---------------+
 
I *think* GnuCash would complain and refuse to load a database with no root account.

Regards,
John Ralls




More information about the gnucash-user mailing list