cvs: pear /MDB2/MDB2/Driver/Reverse mysql.php mysqli.php

From: Date: Sat, 29 Sep 2007 00:30:46 +0000
Subject: cvs: pear /MDB2/MDB2/Driver/Reverse mysql.php mysqli.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-48698@lists.php.net to get a copy of this message
dufuz Sat Sep 29 00:30:46 2007 UTC Modified files: /pear/MDB2/MDB2/Driver/Reverse mysqli.php mysql.php Log: Now we unset default for text fields, not just blob and clob # This solves the problem in MDB2_Schema that many people are having in regards to dumping database to a schema file and installing it again # Empty default results in a varchar field instead of plain text http://cvs.php.net/viewvc.cgi/pear/MDB2/MDB2/Driver/Reverse/mysqli.php?r1=1.63&r2=1.64&diff_format=u Index: pear/MDB2/MDB2/Driver/Reverse/mysqli.php diff -u pear/MDB2/MDB2/Driver/Reverse/mysqli.php:1.63 pear/MDB2/MDB2/Driver/Reverse/mysqli.php:1.64 --- pear/MDB2/MDB2/Driver/Reverse/mysqli.php:1.63 Sat Aug 11 15:37:55 2007 +++ pear/MDB2/MDB2/Driver/Reverse/mysqli.php Sat Sep 29 00:30:45 2007 @@ -42,7 +42,7 @@ // | Author: Lukas Smith <smith@pooteeweet.org> | // +----------------------------------------------------------------------+ // -// $Id: mysqli.php,v 1.63 2007/08/11 15:37:55 quipo Exp $ +// $Id: mysqli.php,v 1.64 2007/09/29 00:30:45 dufuz Exp $ // require_once 'MDB2/Driver/Reverse/Common.php'; @@ -197,7 +197,7 @@ } foreach ($types as $key => $type) { $definition[$key] = $definition[0]; - if ($type == 'clob' || $type == 'blob') { + if ($type == 'clob' || $type == 'blob' || $type == 'text') { unset($definition[$key]['default']); } $definition[$key]['type'] = $type; @@ -228,7 +228,7 @@ if (PEAR::isError($db)) { return $db; } - + list($schema, $table) = $this->splitTableSchema($table_name); $table = $db->quoteIdentifier($table, true); @@ -303,7 +303,7 @@ if (PEAR::isError($db)) { return $db; } - + list($schema, $table) = $this->splitTableSchema($table_name); $constraint_name_original = $constraint_name; http://cvs.php.net/viewvc.cgi/pear/MDB2/MDB2/Driver/Reverse/mysql.php?r1=1.73&r2=1.74&diff_format=u Index: pear/MDB2/MDB2/Driver/Reverse/mysql.php diff -u pear/MDB2/MDB2/Driver/Reverse/mysql.php:1.73 pear/MDB2/MDB2/Driver/Reverse/mysql.php:1.74 --- pear/MDB2/MDB2/Driver/Reverse/mysql.php:1.73 Sat Aug 11 15:37:55 2007 +++ pear/MDB2/MDB2/Driver/Reverse/mysql.php Sat Sep 29 00:30:45 2007 @@ -42,7 +42,7 @@ // | Author: Lukas Smith <smith@pooteeweet.org> | // +----------------------------------------------------------------------+ // -// $Id: mysql.php,v 1.73 2007/08/11 15:37:55 quipo Exp $ +// $Id: mysql.php,v 1.74 2007/09/29 00:30:45 dufuz Exp $ // require_once 'MDB2/Driver/Reverse/Common.php'; @@ -143,7 +143,7 @@ } foreach ($types as $key => $type) { $definition[$key] = $definition[0]; - if ($type == 'clob' || $type == 'blob') { + if ($type == 'clob' || $type == 'blob' || $type == 'text') { unset($definition[$key]['default']); } $definition[$key]['type'] = $type; @@ -337,7 +337,7 @@ return $definition; } } - + return $db->raiseError(MDB2_ERROR_NOT_FOUND, null, null, $constraint_name . ' is not an existing table constraint', __FUNCTION__); }

« previous php.pear.cvs (#48698) next »