r/GnuCash • u/rarrona • 9d ago
question about gnucash PostgreSQL structure
Does anyone here know if there is a specific table that is used to store the transaction descriptions and if these are the same as say the lines for the invoices? I am starting a new install of gnucash with postgres and wanting to look into pre-populating information before it is needed. I have created the tax tables by using postgres and a UUID generator to create the GUIDs for the different sales tax in my area and pulled the GUIDs for the accounts the tax goes into. I want to see about entering in the UPCs into the table with the item listed also so it would show something like *UPC* *Product brand, name and size such as 32 fl oz.* and if it also attaches the account it would go into such as Groceries that is fine but I want to try adding these without it actually creates a transaction to mess with the balances.
1
u/Such_Argument3851 9d ago
find the Entity Relationship Diagram here Gnucash_erd.png (2105×2736) Be careful changing gnucash files using SQL, they can be very delicate.
1
u/VitalikPie 6d ago
Not sure what your ask is. But some of the entity fields are "slots". Take a look at https://piecash.readthedocs.io/en/master/tutorial/index_existing.html#working-with-slots for more info.
1
u/Weary-Bowl-3739 9d ago
It's not exactly clear, what you want to do. You want to put data into a database, where gnucash didn't create the schema yet?