cvs: pear /MDB2/MDB2/Driver/Reverse ibase.php
| From: | Lorenzo Alberton | Date: | Sun, 16 Oct 2005 22:45:46 +0000 |
| Subject: | cvs: pear /MDB2/MDB2/Driver/Reverse ibase.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-35628@lists.php.net to get a copy of this message | ||
quipo Sun Oct 16 18:45:46 2005 EDT
Modified files:
/pear/MDB2/MDB2/Driver/Reverse ibase.php
Log:
skip PRIMARY KEY in getTableIndexDefinition()
http://cvs.php.net/diff.php/pear/MDB2/MDB2/Driver/Reverse/ibase.php?r1=1.22&r2=1.23&ty=u
Index: pear/MDB2/MDB2/Driver/Reverse/ibase.php
diff -u pear/MDB2/MDB2/Driver/Reverse/ibase.php:1.22 pear/MDB2/MDB2/Driver/Reverse/ibase.php:1.23
--- pear/MDB2/MDB2/Driver/Reverse/ibase.php:1.22 Sun Oct 16 12:31:54 2005
+++ pear/MDB2/MDB2/Driver/Reverse/ibase.php Sun Oct 16 18:45:44 2005
@@ -42,7 +42,7 @@
// | Author: Lorenzo Alberton <l.alberton@quipo.it> |
// +----------------------------------------------------------------------+
//
-// $Id: ibase.php,v 1.22 2005/10/16 16:31:54 lsmith Exp $
+// $Id: ibase.php,v 1.23 2005/10/16 22:45:44 quipo Exp $
//
require_once 'MDB2/Driver/Reverse/Common.php';
@@ -232,6 +232,7 @@
LEFT JOIN RDB\$RELATION_CONSTRAINTS ON RDB\$RELATION_CONSTRAINTS.RDB\$INDEX_NAME =
RDB\$INDEX_SEGMENTS.RDB\$INDEX_NAME
WHERE UPPER(RDB\$INDICES.RDB\$RELATION_NAME)='$table'
AND UPPER(RDB\$INDICES.RDB\$INDEX_NAME)='$index_name'
+ AND RDB\$RELATION_CONSTRAINTS.RDB\$CONSTRAINT_TYPE <> 'PRIMARY
KEY'
ORDER BY RDB\$INDEX_SEGMENTS.RDB\$FIELD_POSITION;";
$result = $db->query($query);
if (PEAR::isError($result)) {
@@ -257,10 +258,6 @@
if ($index['unique_flag']) {
$definition['unique'] = true;
}
- if ($index['constraint_type'] == 'PRIMARY KEY') {
- return $db->raiseError(MDB2_ERROR, null, null,
- 'getTableIndexDefinition: it was not specified an existing table index');
- }
foreach ($fields as $field) {
$definition['fields'][$field] = array();
//collation?!?