mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-31 09:06:17 +00:00
Adding descrption compatiblity fixes to SQLite driver (Ticket #1211)
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@3450 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
parent
9f454bf5b9
commit
213e22b1a8
1 changed files with 7 additions and 8 deletions
|
@ -162,15 +162,14 @@ class DboSqlite extends DboSource {
|
|||
return $cache;
|
||||
}
|
||||
$fields = array();
|
||||
$cols = sqlite_fetch_column_types($model->tablePrefix . $model->table, $this->connection);
|
||||
$result = $this->fetchAll('PRAGMA table_info(' . $model->tablePrefix . $model->table . ')');
|
||||
|
||||
pr($cols);
|
||||
die();
|
||||
foreach ($cols as $column => $type) {
|
||||
foreach ($result as $column) {
|
||||
$fields[] = array(
|
||||
'name' => $column,
|
||||
'type' => $this->column($type),
|
||||
'null' => true
|
||||
'name' => $column[0]['name'],
|
||||
'type' => $this->column($column[0]['type']),
|
||||
'null' => ! $column[0]['notnull'],
|
||||
'default' => $column[0]['dflt_value']
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -335,7 +334,7 @@ class DboSqlite extends DboSource {
|
|||
$limit = null;
|
||||
@list($col, $limit) = explode('(', $col);
|
||||
|
||||
if (in_array($col, array('text', 'integer', 'float', 'boolean', 'timestamp'))) {
|
||||
if (in_array($col, array('text', 'integer', 'float', 'boolean', 'timestamp', 'datetime'))) {
|
||||
return $col;
|
||||
}
|
||||
if (strpos($col, 'varchar') !== false) {
|
||||
|
|
Loading…
Add table
Reference in a new issue