Re: MDB2_Schema - dumping indexes and constraints

From: Date: Sun, 18 Jun 2006 22:06:50 +0000
Subject: Re: MDB2_Schema - dumping indexes and constraints
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-42998@lists.php.net to get a copy of this message
Stoyan Stefanov wrote:
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.
well they should definately get added. that part of the code has changed slightly in cvs, but even in 0.5.0 it looks like it should have worked. could you try cvs and if it also fails file a bug report? i will try to get a new release out soon. thx, Lukas

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