#84 pdo bugfixes
--HG-- extra : convert_revision : svn%3Ab267cdba-c1da-11dd-874b-8bacd04a0a74/trunk%4092
This commit is contained in:
@@ -166,8 +166,8 @@ class LayerMYSQL extends AbstractLayer
|
|||||||
$index['type'] = 'UNIQUE';
|
$index['type'] = 'UNIQUE';
|
||||||
if($index['name'] == 'PRIMARY')
|
if($index['name'] == 'PRIMARY')
|
||||||
$index['type'] = 'PRIMARY';
|
$index['type'] = 'PRIMARY';
|
||||||
self::$keys[$constraint['table']][$index['name']]['type'] = $index['type'];
|
self::$keys[$index['table']][$index['name']]['type'] = $index['type'];
|
||||||
self::$keys[$constraint['table']][$index['name']]['columns'][] = $index['column'];
|
self::$keys[$index['table']][$index['name']]['columns'][] = $index['column'];
|
||||||
}
|
}
|
||||||
|
|
||||||
return self::$keys[$table['name']];
|
return self::$keys[$table['name']];
|
||||||
|
|||||||
@@ -178,6 +178,8 @@ class LayerPGSQL extends AbstractLayer
|
|||||||
$keys = array();
|
$keys = array();
|
||||||
foreach($contraints as $constraint)
|
foreach($contraints as $constraint)
|
||||||
{
|
{
|
||||||
|
if($constraint['type'] == 'CHECK')
|
||||||
|
continue;
|
||||||
if($constraint['type'] == 'PRIMARY KEY')
|
if($constraint['type'] == 'PRIMARY KEY')
|
||||||
$constraint['type'] = 'PRIMARY';
|
$constraint['type'] = 'PRIMARY';
|
||||||
self::$keys[$constraint['table']][$constraint['name']]['type'] = $constraint['type'];
|
self::$keys[$constraint['table']][$constraint['name']]['type'] = $constraint['type'];
|
||||||
@@ -187,8 +189,8 @@ class LayerPGSQL extends AbstractLayer
|
|||||||
{
|
{
|
||||||
if($index['unique'] == 't' || $index['primary'] == 't')
|
if($index['unique'] == 't' || $index['primary'] == 't')
|
||||||
continue;
|
continue;
|
||||||
self::$keys[$constraint['table']][$index['name']]['type'] = 'INDEX';
|
self::$keys[$index['table']][$index['name']]['type'] = 'INDEX';
|
||||||
self::$keys[$constraint['table']][$index['name']]['columns'][] = $index['column'];
|
self::$keys[$index['table']][$index['name']]['columns'][] = $index['column'];
|
||||||
}
|
}
|
||||||
|
|
||||||
return self::$keys[$table['name']];
|
return self::$keys[$table['name']];
|
||||||
|
|||||||
Reference in New Issue
Block a user