[ic] IC fails to remove the sequence test-table when creating multiple tables with a serial-column

Joachim Leidinger interchange-users@icdevgroup.org
Fri Jul 19 04:00:01 2002


René Hertell wrote:
>>Did that not means, that you have to delete the tables before the table
>>is creating by IC?
> 
> 
> I guess so. The only problem is that when I remove the
> ic_test_create_code_seq, and restart IC, no new sequences are created...
> Wired..

At the first time, IC creates a database and tables in my MySQL, if 
there are no database or tables in MySQL and after that, IC import all 
datas from the xyz.txt files intos my MySQL. After that, IC create files 
like xyz.sql in the products directory for any tables, which is in my MySQL.

If you remove any table or the whole database from your SQL-Server, you 
have to remove all xyz.sql files from your products directory too.

For example:

 > pwd
/big/usr/home/www/leidinger.local/ic485/intos485/products

 > ll products.*
-rw-------  1 mvend  mvend       1 Jul 16 16:04 products.sql
-rw-r--r--  1 mvend  mvend  772760 Jul 17 14:31 products.txt

mysql> show tables;
+--------------------+
| Tables_in_intos485 |
+--------------------+
| affiliate          |
| area               |
| cat                |
| country            |
| gift_certs         |
| inventory          |
| merchandising      |
| options            |
| order_returns      |
| orderline          |
| pricing            |
| products           |
| state              |
| transactions       |
| userdb             |
+--------------------+
15 rows in set (0.00 sec)


mysql> drop table products;
Query OK, 0 rows affected (0.01 sec)

Start the IC server now!

Configuring catalog intos485...Using MySQL, 
DSN=dbi:mysql:intos485...table 'products' fail               ed: 
DBD::mysql::st execute failed: Table 'intos485.products' doesn't exist 
at /home/ic485/               lib/Vend/Table/DBI.pm line 1370.

intos485 config error: products not a database, cannot use as products file


intos485: error in configuration. Skipping.
intos485: config error. Skipping.


 > rm products.sql

Start the server once more...

Low traffic settings.
Calling UI......UI is loaded...
Running FreeBSD; disabling $0 set
Interchange V4.8.5
Configuring catalog foundation485...Using MySQL, 
DSN=dbi:mysql:test_foundation485...done.
Configuring catalog intos485...Using MySQL, 
DSN=dbi:mysql:intos485...table products created: create table products (
Artikelnummer CHAR(6) NOT NULL PRIMARY KEY,
Beschreibung BLOB,
.....
)

done.

or

without products.sql and existing table products in MySQL.

 > rm products.sql

IC create the table once more.
But if I've a database in my MySQL and use the makecat script once more 
and have the makecat script to create the database with this and that 
name and password for my MySQL, is failed unless, I've drop the database 
before.



>>If tables exist, why did you or IC try to create the tables once more?
> 
> 
> I think the DBI.pm module fails with that procedure. It probably fails in
> removing that table...
 >
> I'm by the way using the *.pgsql files for configuring the tables.

Joachim

-- 
Hans-Joachim Leidinger | Dipl.-Phys.Ing. Entwicklung eCommerce
[leidinger@bpanet.de]
Black Point Arts Internet Solutions GmbH
http://www.bpanet.de