Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 0.8.6

Bug #6053 create sequence error and a warning
Submitted: 2005-11-24 09:23 UTC
From: alex at cgi-central dot net Assigned: lsmith
Status: Closed Package: MDB2_Schema
PHP Version: 4.3.11 OS: any
Roadmaps: (Not assigned)    
Subscription  


 [2005-11-24 09:23 UTC] alex at cgi-central dot net
Description: ------------ 1. There was a warning if array element is not exists in $changes array. It is eliminated by first change in diff. 2. alterDatabaseSequences() function passed $sequence variable to createSequence function. But in $changes array this set to "1", of course it does not look like a valid sequence definition. Fixed. Test script: --------------- +++ MDB2/Schema.php 24 Nov 2005 09:18:54 -0000 @@ -1234,6 +1234,7 @@ function verifyAlterDatabase($changes) { if (array_key_exists('tables', $changes) && is_array($changes['tables'] ) + && array_key_exists('tables', $changes['tables']) && array_key_exists('tables', $changes['tables']['change']) ) { foreach ($changes['tables']['change'] as $table_name => $table) { @@ -1445,7 +1446,7 @@ if (array_key_exists('add', $changes)) { foreach ($changes['add'] as $sequence_name => $sequence) { - $result = $this->createSequence($sequence_name, $sequence); + $result = $this->createSequence($sequence_name, $current_defini tion[$sequence_name]); if (PEAR::isError($result)) { return $result; }

Comments

 [2005-11-24 14:18 UTC] User who submitted this comment has not confirmed identity
If you submitted this note, check your email.If you do not have a message, click here to re-send
MANUAL CONFIRMATION IS NOT POSSIBLE.  Write a message to pear-dev@lists.php.net
to request the confirmation link.  All bugs/comments/patches associated with this

email address will be deleted within 48 hours if the account request is not confirmed!