[GNC] Investment Portfolio Reporting, GC w/SQL DB
Adrien Monteleone
adrien.monteleone at lusfiber.net
Fri Mar 6 12:03:38 EST 2020
> On Mar 6, 2020 w10d66, at 6:56 AM, rsbrux via gnucash-user <gnucash-user at gnucash.org> wrote:
>
> As usual, this turns out to be more complicated than I expected. My Ubuntu Studio 18.04 installation doesn' (yet) have any SQL DB installed.
>
> gnucash-portfolio (http://portfolio.alensiljak.tk/) say it supports SQLite. The GC features page (https://gnucash.org/features.phtml) says that this is still experimental. Is this still the case? I am still using GC 2.6.19. Do I need a newer GC version to use SQLite reliably?
I’ve been using the Sqlite backend for several years now. I found a bug in the early transition to 3.0 (that was not data destructive) and it was promptly fixed in 3.1. Otherwise I’ve had no issues. Note, I’m on a Mac now, but I was using Sqlite originally on Ubuntu on a 2.6.x version.
>
> Furthermore,some sourcess say that I will need to migrate the data myself, e.g.
> https://stackoverflow.com/questions/25736571/gnucash-migrate-from-file-to-mysql
>
> Is this also still the case? If not, what version of GC do I need to be able to just "Save As" to an SQL DB?
I’m not sure about MySQL, but with Sqlite it is as simple as re-saving the file in the chosen format. I’ve even bounced back and forth to XML doing tests with bugs.
>
> All of the posts I have found refer to MySQL rather than SQLite. Can I use the MySQL scripts in SQLite?
As far as I am aware, the tables and relationships are the same, so the same queries should work, but I haven’t tested that.
Always test on a copy of your data file. Keep an original XML handy.
Regardless of the format used - it is advisable never to write directly to any db backend for now, only do Read for safety. Create, Update and Delete should be done via GnuCash itself.
>
> My NAS provides MariaDB instead of MySQL. Would I be able to use this instead?
MariaDB is intended to be a drop-in replacement in most cases for MySQL, (which is one reason why so many distros and stacks have been able to switch to it as default) so yes. In fact I recall some threads where users mention that is what they have installed.
Regards,
Adrien
More information about the gnucash-user
mailing list