Support function default values in insert (bug #713)

This commit is contained in:
Jakub Vrana 2021-02-08 17:52:10 +01:00
parent f2063c92c5
commit 4f8ecd3c11
2 changed files with 4 additions and 0 deletions

View file

@ -1461,6 +1461,9 @@ function edit_form($table, $fields, $row, $update) {
: ($value === false ? null : ($value !== null ? '' : 'NULL'))
)
);
if (!$_POST && !$update && $value == $field["default"] && preg_match('~^[\w.]+\(~', $value)) {
$function = "SQL";
}
if (preg_match("~time~", $field["type"]) && preg_match('~^CURRENT_TIMESTAMP~i', $value)) {
$value = "";
$function = "now";

View file

@ -1,4 +1,5 @@
Adminer 4.7.10-dev:
Support function default values in insert (bug #713)
Allow SQL pseudo-function in insert
Skip date columns for non-date values in search anywhere
Add DB version to comment in export