Support current_timestamp() as default of time fields (bug #572)
This commit is contained in:
parent
43ccfcef8f
commit
72aa3c5127
|
@ -198,7 +198,7 @@ function process_field($field, $type_field) {
|
||||||
process_type($type_field),
|
process_type($type_field),
|
||||||
($field["null"] ? " NULL" : " NOT NULL"), // NULL for timestamp
|
($field["null"] ? " NULL" : " NOT NULL"), // NULL for timestamp
|
||||||
(isset($default) ? " DEFAULT " . (
|
(isset($default) ? " DEFAULT " . (
|
||||||
(preg_match('~time~', $field["type"]) && preg_match('~^CURRENT_TIMESTAMP$~i', $default))
|
(preg_match('~time~', $field["type"]) && preg_match('~^CURRENT_TIMESTAMP(\(\))?$~i', $default))
|
||||||
|| ($jush == "sqlite" && preg_match('~^CURRENT_(TIME|TIMESTAMP|DATE)$~i', $default))
|
|| ($jush == "sqlite" && preg_match('~^CURRENT_(TIME|TIMESTAMP|DATE)$~i', $default))
|
||||||
|| ($field["type"] == "bit" && preg_match("~^([0-9]+|b'[0-1]+')\$~", $default))
|
|| ($field["type"] == "bit" && preg_match("~^([0-9]+|b'[0-1]+')\$~", $default))
|
||||||
|| ($jush == "pgsql" && preg_match("~^[a-z]+\\(('[^']*')+\\)\$~", $default))
|
|| ($jush == "pgsql" && preg_match("~^[a-z]+\\(('[^']*')+\\)\$~", $default))
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
Adminer 4.4.1-dev:
|
Adminer 4.4.1-dev:
|
||||||
Display newlines in column comments (bug #573)
|
Display newlines in column comments (bug #573)
|
||||||
|
Support current_timestamp() as default of time fields (bug #572)
|
||||||
Adminer: Fix Search data in tables (regression from 4.4.0)
|
Adminer: Fix Search data in tables (regression from 4.4.0)
|
||||||
CSP: Allow any styles, images, media and fonts, disallow base-uri
|
CSP: Allow any styles, images, media and fonts, disallow base-uri
|
||||||
MySQL: Support geometry in MySQL 8 (bug #574)
|
MySQL: Support geometry in MySQL 8 (bug #574)
|
||||||
|
|
Loading…
Reference in a new issue