changed autoinc key to autoincrement
This commit is contained in:
parent
33ed595536
commit
4a99e766a3
@ -119,7 +119,7 @@ class Doctrine_Import_Mysql extends Doctrine_Import
|
||||
$sql = 'DESCRIBE ' . $this->conn->quoteIdentifier($table, true);
|
||||
$result = $this->conn->fetchAssoc($sql);
|
||||
|
||||
$description = array();
|
||||
$description = array();
|
||||
$columns = array();
|
||||
foreach ($result as $key => $val) {
|
||||
|
||||
@ -130,19 +130,19 @@ class Doctrine_Import_Mysql extends Doctrine_Import
|
||||
$values = isset($decl['values']) ? $decl['values'] : array();
|
||||
|
||||
$description = array(
|
||||
'name' => $val['field'],
|
||||
'type' => $decl['type'][0],
|
||||
'alltypes' => $decl['type'],
|
||||
'ntype' => $val['type'],
|
||||
'length' => $decl['length'],
|
||||
'fixed' => $decl['fixed'],
|
||||
'unsigned' => $decl['unsigned'],
|
||||
'values' => $values,
|
||||
'primary' => (strtolower($val['key']) == 'pri'),
|
||||
'default' => $val['default'],
|
||||
'notnull' => (bool) ($val['null'] != 'YES'),
|
||||
'autoinc' => (bool) (strpos($val['extra'], 'auto_increment') !== false),
|
||||
);
|
||||
'name' => $val['field'],
|
||||
'type' => $decl['type'][0],
|
||||
'alltypes' => $decl['type'],
|
||||
'ntype' => $val['type'],
|
||||
'length' => $decl['length'],
|
||||
'fixed' => $decl['fixed'],
|
||||
'unsigned' => $decl['unsigned'],
|
||||
'values' => $values,
|
||||
'primary' => (strtolower($val['key']) == 'pri'),
|
||||
'default' => $val['default'],
|
||||
'notnull' => (bool) ($val['null'] != 'YES'),
|
||||
'autoincrement' => (bool) (strpos($val['extra'], 'auto_increment') !== false),
|
||||
);
|
||||
$columns[$val['field']] = $description;
|
||||
}
|
||||
|
||||
@ -209,4 +209,4 @@ class Doctrine_Import_Mysql extends Doctrine_Import
|
||||
|
||||
return $this->conn->fetchColumn($query);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user