'gncentry' table mis-named

Linas Vepstas linas@linas.org
Mon, 4 Mar 2002 09:33:59 -0600


On Sat, Mar 02, 2002 at 05:13:47PM -0500, Derek Atkins was heard to remark:
> I'm looking at data storage for the business modules, and I found a
> table called "gncEntry".  This table seems mis-named.  It appears that
> this table is really a "gncSplit", but I understand that Linas hates
> the name "split".  

I don't hate the word "split", I'm the one who named it that.  Its just
that everyone else yelled at me for picking such  a stupid name that ... 

Well, at one point, we decided that "split" wasn't an accounting term,
and that the correct term was Journal Entry or Entry for short, and 
so all the code would be s/split/entry/g.   But this change was done 
only in the sql backend, and not elsewhere.

> However, I've already got another object called a
> 'GncEntry', so I'd like to use that table name.
> 
> I'd like to rename the gncEntry table to gncJournalEntry.
> 
> Any objections?

Well, to do this, you need to write the upgrade script that will copy
existing tables by this name to the new name.  You'd also need to  erase
existing stored proceedures that use this name, and recreate thenm with
the new name. And so on.  (src/backend/postgres/upgrade.c) This isn't 
hard, but its not fool-proof either.  I think the risk of introducing 
new bugs outweighs the name change ... 

Wouldn't it be easier to rename the business-object-entry into something
more descriptive?  Or if that doesn't work, how about calling the
sql table something like GncBOEntry? I think that would be a lot easier
...


--linas


-- 
pub  1024D/01045933 2001-02-01 Linas Vepstas (Labas!) <linas@linas.org>
PGP Key fingerprint = 8305 2521 6000 0B5E 8984  3F54 64A9 9A82 0104 5933