mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-20 11:48:30 -06:00
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@16216 57a11ea4-9604-0410-9ed3-97b8803252fd |
||
---|---|---|
.. | ||
gnc2sql_update.pl | ||
gnc2sql.pl | ||
gnctables.sql | ||
README |
[jsled, 2007-06-26:] Contributed scripts from Klaus Dahlke <klaus.dahlke@gmx.de> to generate a set of SQL statements effectively importing a 2.0.5-format datafile into the (Postgres) sql schema for gnucash-1.8. <http://lists.gnucash.org/pipermail/gnucash-user/2007-May/020473.html> From Kalus' contribution email, <http://lists.gnucash.org/pipermail/gnucash-user/2007-May/020477.html>: ------------------------------------------------------------ Hi all, please find attached three files: 1) gnctables.sql: creates the old gnucash relevant tables in an existing database. Please set the user accordingly in the script first and please be aware that the new features like customers, scheduled transaction etc are not represented by the table structure. But for reporting purposes the table structure is good enough. 2) gnc2sql.pl: script for initial data load. Please check line 35 for the proper file name for the gnucash zipped xml file, check line 68 for connecting to the database. 3) gnc2sql_update.sql: script for delta load. Unfortunately, it has to read the entire xml-file, but posts only the transactions since last upload/delta-upload. As above check line 39 for the file where the date of last upload is stored, check line 49 for the gnucash-file and check line 81 for connecting to the database. This script doesn't create new accounts or new commodities as neither of the tables have a date filed. You have to do that 'by hand' by evaluating the accountguid of a split. My assumption is that having new accounts and new commodities is not so often that doing it manually is sufficient. If the delta upload fails for what reason ever, you may delete the content of all tables and just run the initial load script (gnc2sql.pl) again.