Skip to content

Commit f185e68

Browse files
committed
Add extra field for timestamp migration
1 parent c0c3440 commit f185e68

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/PHPFUI/ORM/Schema/Field.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ class Field
1616

1717
public readonly string $type;
1818

19+
public readonly string $extra;
20+
1921
/**
2022
* @param array<string,mixed> $fields
2123
*/
@@ -29,7 +31,7 @@ public function __construct(\PHPFUI\ORM\PDOInstance $pdo, array $fields, bool $a
2931
$this->defaultValue = $fields['Default'];
3032
$this->primaryKey = false; // use indexes to find primary keys
3133
$this->autoIncrement = \str_contains($fields['Extra'], 'auto_increment');
32-
34+
$this->extra = str_replace('auto_increment', '', $fields['Extra']);
3335
return;
3436
}
3537
// SQLite
@@ -39,5 +41,6 @@ public function __construct(\PHPFUI\ORM\PDOInstance $pdo, array $fields, bool $a
3941
$this->defaultValue = $fields['dflt_value'];
4042
$this->primaryKey = (bool)$fields['pk'];
4143
$this->autoIncrement = $autoIncrement && $this->primaryKey;
44+
$this->extra = '';
4245
}
4346
}

0 commit comments

Comments
 (0)