[whups] DB Schema Question

Chuck Hagenbuch chuck@horde.org
Fri Nov 22 04:28:37 2002


Quoting Mike Baptiste <mike@msbnetworks.net>:

> I've noticed that for many of the whups tables with an incremental
> primary key, a secondary sequence table ending in _seq with one row is
> used to keep track of the ID sequence.   Why wasn't an AUTO_INCREMENT
> field for the primary key used instead?  DB Portability?  Just curious.

In a hellishly unportable standard, AUTO_INCREMENT is one of the _least_
portable ideas ever; it works with nothing but MySQL. We use PEAR DB::
sequences to make sure that Whups works with pretty much any database; I
routinely work on it on my win2k laptop running MS-SQL.

> I'm bringing the whups_attachments table back to life to link tickets to
> VFS object IDs and to store attachment attributes.  I figure I'll need a
> whups_attachments_seq table as well, but wanted to ask to make sure.

You don't create the _seq table; DB:: creates it for you.

-chuck

--
Charles Hagenbuch, <chuck@horde.org>
"People ask me all the time what it will be like living without otters."
 - Google, thanks to Harpers


More information about the whups mailing list