[ic] Adding fields using mysql

Jonathan Clark interchange-users@interchange.redhat.com
Tue Sep 18 11:48:00 2001


> > 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 ?

Yes, that's why. That is, if you were to delete the userdb.sql file and
restart ic, the MySQL table would be dropped and recreated, using the
_userdb.txt_ structure, but the field definitions from the userdb.mysql
file.

So, either create the field directly in mysql and restart ic (and then maybe
export the table to the txt file to get the structure), or alter the
strucure in userdb.txt, delete the userdb.sql file and restart ic.

Jonathan
Webmaint.