Support function default values in insert (bug #713)
This commit is contained in:
parent
f2063c92c5
commit
4f8ecd3c11
|
@ -1461,6 +1461,9 @@ function edit_form($table, $fields, $row, $update) {
|
||||||
: ($value === false ? null : ($value !== null ? '' : 'NULL'))
|
: ($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)) {
|
if (preg_match("~time~", $field["type"]) && preg_match('~^CURRENT_TIMESTAMP~i', $value)) {
|
||||||
$value = "";
|
$value = "";
|
||||||
$function = "now";
|
$function = "now";
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
Adminer 4.7.10-dev:
|
Adminer 4.7.10-dev:
|
||||||
|
Support function default values in insert (bug #713)
|
||||||
Allow SQL pseudo-function in insert
|
Allow SQL pseudo-function in insert
|
||||||
Skip date columns for non-date values in search anywhere
|
Skip date columns for non-date values in search anywhere
|
||||||
Add DB version to comment in export
|
Add DB version to comment in export
|
||||||
|
|
Loading…
Reference in a new issue