Skip to content

Commit cf933ab

Browse files
committed
MariaDB support
1 parent 3b32ee8 commit cf933ab

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/PHPFUI/ORM/Schema/Field.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,11 @@ public function __construct(\PHPFUI\ORM\PDOInstance $pdo, array $fields, bool $a
2929
$this->type = \strtolower($fields['Type']);
3030
$this->nullable = 'YES' == $fields['Null'];
3131
$this->defaultValue = $fields['Default'];
32-
$this->primaryKey = false; // use indexes to find primary keys
32+
if ('current_timestamp()' == $this->defaultValue)
33+
{
34+
$this->defaultValue = 'CURRENT_TIMESTAMP';
35+
}
36+
$this->primaryKey = false; // use indexes to find primary keys
3337
$this->autoIncrement = \str_contains($fields['Extra'], 'auto_increment');
3438
$this->extra = \str_replace('auto_increment', '', $fields['Extra']);
3539

0 commit comments

Comments
 (0)