Skip to content

Commit

Permalink
Fix detection of date columns on SQLite.
Browse files Browse the repository at this point in the history
  • Loading branch information
hschletz committed Mar 10, 2024
1 parent b530cef commit 1b15f42
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/Column/Sqlite.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,11 @@ protected function _parseDatatype($data)
$this->_datatype = self::TYPE_BLOB;
} elseif (preg_match('/(REAL|FLOA|DOUB)/', $type)) {
$this->_datatype = self::TYPE_FLOAT;
} elseif ($type == 'DATE') {
// While type affinity rules would handle any other type as numeric,
// the type name itself is preserved and can be used for these
// types.
$this->_datatype = self::TYPE_DATE;
} else {
throw new UnexpectedValueException('Unrecognized SQLite Datatype: ' . $data['type']);
}
Expand Down

0 comments on commit 1b15f42

Please sign in to comment.