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

Bug #16384 alterTable() does not remove NOT NULL constraints
Submitted: 2009-06-28 00:22 UTC
From: hschletz Assigned: quipo
Status: Closed Package: MDB2_Driver_pgsql (version 1.5.0b2)
PHP Version: Irrelevant OS:
Roadmaps: (Not assigned)    
Subscription  


 [2009-06-28 00:22 UTC] hschletz (Holger Schletz)
Description: ------------ Trying to use alterTable() to remove a NOT NULL constraint from a column has no effect. Patch attached. Test script: --------------- $changes = array ( 'change' => array ( 'foobar' => array ( 'notnull' => true, 'definition' => array ( 'type' => 'integer', 'length' => '4', 'was' => 'foobar', 'notnull' => false, ) ) ) ) $mdb2->manager->alterTable ("foo", $changes, false); Expected result: ---------------- The column "foobar" should not have a NOT NULL constraint. Actual result: -------------- The column "foobar" remains unaltered.

Comments

 [2009-06-28 00:23 UTC] hschletz (Holger Schletz)
The following patch has been added/updated: Patch Name: fix_remove_notnull_constraint Revision: 1246130593 URL: http://pear.php.net/bugs/patch-display.php?bug=16384&patch=fix_remove_notnull_constraint&revision=1246130593&display=1
 [2009-06-28 00:34 UTC] quipo (Lorenzo Alberton)
-Status: Open +Status: Closed -Assigned To: +Assigned To: quipo
This bug has been fixed in CVS. If this was a documentation problem, the fix will appear on pear.php.net by the end of next Sunday (CET). If this was a problem with the pear.php.net website, the change should be live shortly. Otherwise, the fix will appear in the package's next release. Thank you for the report and for helping us make PEAR better.