Bug #19676 [Asn]: Postgresql Alter table remove autoincrement

From: Date: Fri, 09 Nov 2012 14:42:58 +0000
Subject: Bug #19676 [Asn]: Postgresql Alter table remove autoincrement
References: 1  Groups: php.pear.bugs 
Request: Send a blank email to pear-bugs+get-9315@lists.php.net to get a copy of this message
Edit report at https://pear.php.net/bugs/bug.php?id=19676&edit=1 ID: 19676 Updated by: danielc@analysisandsolutions.com Reported By: brice at bmaron dot net Summary: Postgresql Alter table remove autoincrement Status: Assigned Type: Bug Package: MDB2_Schema Operating System: Linux- Debian Stable Package Version: 0.8.5 PHP Version: 5.3.2 Assigned To: danielc Roadmap Versions: New Comment: This may be related to fixes for bug #16280 or bug #18494. I'll look into it. Previous Comments: ------------------------------------------------------------------------ [2012-11-03 14:52:12] doconnor @Daniel - are you able to take a look and pin down what the underlying change was in MDB2 land? ------------------------------------------------------------------------ [2012-11-03 14:50:34] doconnor -Assigned To: +Assigned To: danielc ------------------------------------------------------------------------ [2012-10-26 09:16:12] emerzh Added #patch bug:19676;patch:v2patch;revision:1351239372;. ------------------------------------------------------------------------ [2012-10-26 09:02:49] emerzh Added #patch bug:19676;patch:v1patch;revision:1351238569;. ------------------------------------------------------------------------ [2012-10-26 08:57:27] emerzh Description: ------------ In Owncloud, we use MDB2 schema to manage our DB migrations.. some users on postgresql had problems with primary keys when an update happend The schema was even not changed MDB2 change all oc_calendar_objects . id => default nextval('oc_calendar_objects_id_seq'); to oc_calendar_objects . id => default 0; If made a patch to work around the problem I made a patch for this problem : https://gist.github.com/3955908 Test script: --------------- have a schema like this with PG <?xml version="1.0" encoding="ISO-8859-1" ?> <database> <name>*dbname*</name> <create>true</create> <overwrite>false</overwrite> <charset>utf8</charset> <table> <name>*dbprefix*calendar_objects</name> <declaration> <field> <name>id</name> <type>integer</type> <default>0</default> <notnull>true</notnull> <autoincrement>1</autoincrement> <unsigned>true</unsigned> <length>4</length> </field> </declaration> </table> and try to do the update of you db check your DB and see the default value is gone Expected result: ---------------- Leave the sequence as is. ------------------------------------------------------------------------ -- Edit this bug report at https://pear.php.net/bugs/bug.php?id=19676&edit=1

« previous php.pear.bugs (#9315) next »