[ic] How to Add new fields to Product Database and edit them in Admin UI ???

Doug Alcorn interchange-users@lists.akopia.com
Mon Jul 9 01:19:01 2001


"Jonathan Clark" <jonc@webmaint.com> writes:

> 
> 1) Edit the <catroot>/dbconf/mysql/products.mysql file and add your new
> fields of appropriate data type. This ensures they get your type and not ICs
> best guess (char(128)?)
> 2) Delete the <catroot>/products/products.sql file.
> 3) Restart IC.
> 
> deleting the .sql file and restarting will cause the products table to be
> dropped, recreated as per the .mysql file, and the data imported from the
> text file <catroot>/products/products.txt

This isn't quite clear.  Deleting the .sql file does cause IC to
re-import/create the table.  However, the columns created are not
gotten from the .mysql file; only the column definitions.  The
distinction is subtle and cruel.  The columns created is actually
taken directly from the first line of the .txt file.  So, if you add
the COLUMN_DEF in the .mysql file, but don't list the column in the
.txt file it won't get created.
-- 
 (__) 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.