Re: Re: MDB2_Schema - dumping indexes and constraints
| From: | Stoyan Stefanov | Date: | Sun, 18 Jun 2006 22:31:41 +0000 |
| Subject: | Re: Re: MDB2_Schema - dumping indexes and constraints | ||
| References: | 1 2 3 4 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-43000@lists.php.net to get a copy of this message | ||
Thanks! I tried the CVS version and worked as expected.
Stoyan
On 6/19/06, Lukas Smith <lsmith@php.net> wrote: Lukas Smith wrote:-- Stoyan Stefanov http://www.phpied.comStoyan Stefanov wrote:btw .. the bug could also be in MDB2. so make sure you are using the lastest MDB2 code .. regards, Lukas -- PEAR Development Mailing List (http://pear.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Stoyan Stefanov http://www.phpied.comwell 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.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.