File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed
lib/TestDbAcle/Db/Mysql/Table
tests/TestDbAcle/Db/Mysql/Table Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ public function isAutoIncrement()
2121
2222 public function isDateTime ()
2323 {
24- return strpos ($ this ->meta ['Type ' ], 'date ' ) !== false ;
24+ return strpos ($ this ->meta ['Type ' ], 'date ' ) !== false || strpos ( $ this -> meta [ ' Type ' ], ' timestamp ' ) !== false ;
2525 }
2626
2727 public function isNullable ()
Original file line number Diff line number Diff line change @@ -14,10 +14,12 @@ public function test_isDateTime() {
1414
1515 $ columnDate = new \TestDbAcle \Db \Mysql \Table \Column (array ('Type ' => 'date ' ));
1616 $ columnDateTime = new \TestDbAcle \Db \Mysql \Table \Column (array ('Type ' => 'datetime ' ));
17+ $ columnTimestamp = new \TestDbAcle \Db \Mysql \Table \Column (array ('Type ' => 'timestamp ' ));
1718 $ columnTinyBlob = new \TestDbAcle \Db \Mysql \Table \Column (array ('Type ' => 'tinyblob ' ));
18-
19+
1920 $ this ->assertTrue ($ columnDate ->isDateTime ());
2021 $ this ->assertTrue ($ columnDateTime ->isDateTime ());
22+ $ this ->assertTrue ($ columnTimestamp ->isDateTime ());
2123 $ this ->assertFalse ($ columnTinyBlob ->isDateTime ());
2224
2325 }
You can’t perform that action at this time.
0 commit comments