From 7325ff61872b446e2dbfa9e70f5e03baed84c3a4 Mon Sep 17 00:00:00 2001 From: Chris Berkhout Date: Tue, 24 Aug 2021 16:52:38 +0200 Subject: [PATCH] Update gnucash-sql section of README. --- README.md | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index f339b38..be051e1 100644 --- a/README.md +++ b/README.md @@ -153,10 +153,18 @@ pricehist fetch ecb EUR/AUD -s 2021-01-01 -o gnucash-sql | psql -U username -d d Beware that the GnuCash project itself does not support integration at the database level, so there is a risk that the SQL generated by `pricehist` will -be ineffective or even damaging for some version of GnuCash. +be ineffective or even damaging for some version of GnuCash. In practice, this +strategy has been used successfully by other projects. Reading the SQL and +keeping regular database backups is recommended. -In practice, this strategy has been used successfully by other projects. -Reading the SQL and keeping regular database backups is recommended. +The GnuCash database must already contain commodities with mnemonics matching +the base and quote of new prices, otherwise the SQL will fail without making +changes. + +Each price entry is given a GUID based on its content (date, base, quote, +source, type and amount) and existing GUIDs are skipped in the final insert, so +you can apply identical or overlapping SQL files multiple times without +creating duplicate entries in the database. ### Show source information