[ic] Adding fields using mysql

Zack Johnson interchange-users@interchange.redhat.com
Tue Sep 18 11:59:01 2001


Good thought.  I dropped the table, but IC did not re-create it.  Good think
it's an empty cat :)

I'm not sure I understand well enough how IC works with RDMS's.  I was under
the impression that IC consults each catalog's
/dbconf/<dbtype>/<table>.<dbtype> every time it starts.  Tables/fields not
existing would then be automatically added per the <table>.<dbtype>
specification. For example:

1. Reads "userdb.mysql" < Database  userdb  COLUMN_DEF   "list TEXT NOT
NULL" (EOL)
2. Connects to database.
3. Show userdb.  If successful, move on.  If not, CREATE TABLE USERDB. . .
4. Describe userdb.  If "list" exists, move on.  If not, ALTER TABLE USERDB
ADD list TEXT NOT NULL.

>From what could gleen from other posts, simply editing the .mysql for that
table would do the trick upon restart.  Am I mistaken?

TIA!

Zack

PS> I can successfully add fields my using mysql client, or phpmyadmin, and
then adding the appropriate mv_metadata entry.  However, I would like to
maintain the table defs in case I need to rebuild the cat, or want to use
this cat as a template for others.


----- Original Message -----
From: "Stefan Hornburg (Racke)" <racke@linuxia.de>
To: <interchange-users@interchange.redhat.com>
Sent: Tuesday, September 18, 2001 11:28 AM
Subject: Re: [ic] Adding fields using mysql


> "Zack Johnson" <zack@office.standardprinting.net> writes:
>
> > I added a field to dbconf/mysql/userdb.mysql:
> >
> > Database  userdb  COLUMN_DEF   "list TEXT NOT NULL"
> >
> > However, when I restart IC, the field is not added to the database.
Under
> > Admin > table information > userdb, 'list' comes up under COLUMN_DEF,
but
> > not name.
> >
> > 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.
>
> Hm, maybe IC considers these line only when the table doesn't already
> exist ?
>
> Ciao
>         Racke
>
> --
> Racke happily hacks Interchange and maintains Debian packages like
Courier.
>
> For projects and other business stuff please refer to COBOLT NetServices
> (URL: http://www.cobolt.net; Email: info@cobolt.net; Phone:
0041-1-3884400)
> _______________________________________________
> interchange-users mailing list
> interchange-users@interchange.redhat.com
> http://interchange.redhat.com/mailman/listinfo/interchange-users
>