After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 560165 - field definitions could be streamlined
field definitions could be streamlined
Status: RESOLVED OBSOLETE
Product: GnuCash
Classification: Other
Component: Backend - SQL
git-master
Other Linux
: Normal enhancement
: ---
Assigned To: Chris Shoemaker
Chris Shoemaker
Depends on:
Blocks: 722121
 
 
Reported: 2008-11-10 15:51 UTC by Rolf Leggewie
Modified: 2018-06-29 22:12 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
suggestions for field types (3.17 KB, text/plain)
2008-11-10 15:56 UTC, Rolf Leggewie
Details

Description Rolf Leggewie 2008-11-10 15:51:59 UTC
I stumbled upon this when I tried to add a second table as an extension to the accounts table to hold some additional fields.  I need them for some reports from the German standard chart of account SKR04.  I tried to add a child table with 'code' as the foreign primary key.  That failed because varchar(2048) is too big to be a primary key.
Comment 1 Rolf Leggewie 2008-11-10 15:56:06 UTC
Created attachment 122332 [details]
suggestions for field types

I was told in #mysql to run "SELECT * FROM accounts PROCEDURE ANALYSE( 0, 0);" in mysql to find out about more appropriate values for the field types.  Maybe they can serve as a general suggestion.
Comment 2 Phil Longstaff 2008-11-10 16:06:55 UTC
I'm open to suggestions to improve the fields.  In general, the direction from the gnucash-devel list has been that strings should be of unlimited length.  Of course, this is not possible with an SQL db, so that is where the 2048 length comes from.  I don't know whether 'code' could be shorted or not.
Comment 3 Rolf Leggewie 2008-11-12 10:50:39 UTC
I certainly think the fields need to be shortened.  Maybe some discussion in #mysql would help make an educated decision.  I think that the fields should mostly not exceed the length suitable for a primary key to make it possible to add external tables with foreign keys.
Comment 4 Phil Longstaff 2009-09-08 19:31:27 UTC
Nothing is going to be done for now.  Perhaps a future release.
Comment 5 John Ralls 2018-06-29 22:12:28 UTC
GnuCash bug tracking has moved to a new Bugzilla host. The new URL for this bug is https://bugs.gnucash.org/show_bug.cgi?id=560165. Please continue processing the bug there and please update any external references or bookmarks.