FAQ: Adding new columns to tables (was: [ic] Adding fields using mysql)

Doug Alcorn interchange-users@interchange.redhat.com
Thu Sep 20 09:04:00 2001


"Zack Johnson" <zack@office.standardprinting.net> writes:

> I'm lost on this one.  I checked through the IC Docs/mail archives,
> but most of everything seems focused on products, not tables in
> general.

I know I've answered this a couple of times.  I think this needs to go
in the FAQ somewhere.  Here's the answer I would give.

First, sql tables are created iff there is no tablename.sql (and
there's some catalog setting that determines if you always create the
table on startup, but I can't find it right now).  The layout for the
tables are determined _entirely_ from the column headings in the
tablename.txt.  The column type is determined from the COLUMN_DEF if
one exists for the specified column name.  If there's not a
COLUMN_DEF, then the default column definition is used.

Armed with this information, Ed's procedure he outlined should make
sense.  The only reason I posted this was to give the background on
how IC performs it's logic for table creation.  Hopefully this will
show up in the FAQ.  At the least it should show up in a google search
on table creation in interchange or adding columns in interchange.
-- 
 (__) Doug Alcorn (mailto:doug@lathi.net http://www.lathi.net)
 oo / PGP 02B3 1E26 BCF2 9AAF 93F1  61D7 450C B264 3E63 D543
 |_/  If you're a capitalist and you have the best goods and they're
      free, you don't have to proselytize, you just have to wait.