MDB2_Schema - dumping indexes and constraints

From: Date: Sun, 18 Jun 2006 21:58:41 +0000
Subject: MDB2_Schema - dumping indexes and constraints
Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-42997@lists.php.net to get a copy of this message
Hi all, I tried MDB2_Schema::getDefinitionFromDatabase() with a table that has one index and one constraint (primary key), using the mysql driver. In the result array I got the index but not the primary key. Looking at the code I see that the method calls listTableIndexes() from the manager module, and then listTableConstraints(), but what listTableConstraints() returns is not added to the return result, because of a check on line 481: && !array_key_exists('indexes', $table_definition) So if there are indexes, the constraints are not returned. Is this the expected behaviour or maybe I'm misunderstanding something? I'm using MDB2_Schema 0.5.0. Thanks, Stoyan -- Stoyan Stefanov http://www.phpied.com

« previous php.pear.dev (#42997) next »