Commit 4a99e766 authored by zYne's avatar zYne

changed autoinc key to autoincrement

parent 33ed5955
...@@ -119,7 +119,7 @@ class Doctrine_Import_Mysql extends Doctrine_Import ...@@ -119,7 +119,7 @@ class Doctrine_Import_Mysql extends Doctrine_Import
$sql = 'DESCRIBE ' . $this->conn->quoteIdentifier($table, true); $sql = 'DESCRIBE ' . $this->conn->quoteIdentifier($table, true);
$result = $this->conn->fetchAssoc($sql); $result = $this->conn->fetchAssoc($sql);
$description = array(); $description = array();
$columns = array(); $columns = array();
foreach ($result as $key => $val) { foreach ($result as $key => $val) {
...@@ -130,19 +130,19 @@ class Doctrine_Import_Mysql extends Doctrine_Import ...@@ -130,19 +130,19 @@ class Doctrine_Import_Mysql extends Doctrine_Import
$values = isset($decl['values']) ? $decl['values'] : array(); $values = isset($decl['values']) ? $decl['values'] : array();
$description = array( $description = array(
'name' => $val['field'], 'name' => $val['field'],
'type' => $decl['type'][0], 'type' => $decl['type'][0],
'alltypes' => $decl['type'], 'alltypes' => $decl['type'],
'ntype' => $val['type'], 'ntype' => $val['type'],
'length' => $decl['length'], 'length' => $decl['length'],
'fixed' => $decl['fixed'], 'fixed' => $decl['fixed'],
'unsigned' => $decl['unsigned'], 'unsigned' => $decl['unsigned'],
'values' => $values, 'values' => $values,
'primary' => (strtolower($val['key']) == 'pri'), 'primary' => (strtolower($val['key']) == 'pri'),
'default' => $val['default'], 'default' => $val['default'],
'notnull' => (bool) ($val['null'] != 'YES'), 'notnull' => (bool) ($val['null'] != 'YES'),
'autoinc' => (bool) (strpos($val['extra'], 'auto_increment') !== false), 'autoincrement' => (bool) (strpos($val['extra'], 'auto_increment') !== false),
); );
$columns[$val['field']] = $description; $columns[$val['field']] = $description;
} }
...@@ -209,4 +209,4 @@ class Doctrine_Import_Mysql extends Doctrine_Import ...@@ -209,4 +209,4 @@ class Doctrine_Import_Mysql extends Doctrine_Import
return $this->conn->fetchColumn($query); return $this->conn->fetchColumn($query);
} }
} }
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment