[ic] Removing Tables

Marty Tennison interchange-users@icdevgroup.org
Tue Jan 28 12:47:01 2003


On Tue, 2003-01-28 at 07:44, Greg Goble wrote:
> Hi list,
> 
> RH7.3
> IC4.8.5
> 
> If I remove a table that I do not need, for example userdb.* from
> catalog/products & catalog/dbconf/pgsql where else do I need to remove
> userdb.* or any associations to it?

DROP TABLE userdb;  

(caution - see below)

> 
> I'm getting the following error message in my error.log, which I think is
> causing problems with the IC and preventing my 'log out' link from
> happening. Nothing else has been changed to cause this error otherwise.
> 
> ERROR:
> 
> ip_address fIRkmuUQ:login login [28/January/2003:16:38:18 +0100] training
> /cgi-bin/catalog/admin/login.html Runtime error: user database userdb does
> not exist.

This error is caused because you deleted the userdb table.  You cannot
just delete a table "assuming" that you do not need it.  You must be
absolutely sure that none of the underlying code is going to try and use
that table for **anything**.  In the case of userdb, if you are using a
catalog even closely resembling the Foundation demo, you are going to
have a big job on your hands trying to delete userdb without causing any
errors.

> Also when I update my products or remove an item it tries to remove any
> association to the other tables, correct?. When the table such as userdb.*
> has been removed then I also get an error msg from IC in the products page
> itself. Thus my latter assumption.

Yes, Interchange tries to keep it's data as clean as possible by
deleting data that may be related to data in another table.  ie:
products and options.  However, this has nothing to do with why you are
getting an error on your products page. The error you are getting is
because you deleted a table that is needed by some code in the page.  

> 
> How do I properly remove tables that I do not need?

Again, this is going to probably give you a major headache unless you
are really familiar with the internal workings of Interchange.  You are
MUCH better off to leave the table structure as it is and add your own
tables as needed or you can modify the current tables by adding columns
to the end of the tables without affecting the functionality of the
catalog.

> 
> Thanks, Greg G.
> 


-- 
Marty Tennison <marty@sediva.com>