
[Date Prev][Date Next][Thread Prev][Thread Next][Interchange by date
][Interchange by thread
]
Re: [ic] Adding fields using mysql
At 05:28 PM 09/18/2001 +0200, you wrote:
>"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
>
This is my procedure for adding columns to tables when using MySQL:
1. Export the table in question via the UI.
2. Add the additional column(s) to the resulting tablename.txt file. For a
single column I usually do this in a shell session by inserting an extra
tab at the end of each row (in the products directory):
perl -i -p -e 's/\n/\t\n/g' tablename.txt
...then I edit the file, typing the new column name at the end of the first
(header) row.
3. Delete the tablename.sql file.
4. edit CATROOT/dbconf/mysql/tablename.mysql, adding the new column
definition. BTW - be careful with text editors that automatically create
backup copies of files - delete any backup copies that appear in this
directory!
5. Reconfigure the catalog (or restart IC, either will do the job).
- Ed L.
===============================================================
New Media E.M.S. Software Solutions for Business
463 Main St., Suite D eCommerce | Consulting | Hosting
Placerville, CA 95667 edl@newmediaems.com
(530) 622-9421 http://www.newmediaems.com
(866) 519-4680 Toll-Free (530) 622-9426 Fax
===============================================================
_______________________________________________
interchange-users mailing list
interchange-users@interchange.redhat.com
http://interchange.redhat.com/mailman/listinfo/interchange-users