mirror of
https://github.com/vrana/adminer.git
synced 2025-08-10 08:34:20 +02:00
SQLite: Support CURRENT_* default values (bug #417)
This commit is contained in:
@@ -196,6 +196,7 @@ function process_field($field, $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))
|
||||||
|| ($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))
|
||||||
? $default : q($default)) : ""),
|
? $default : q($default)) : ""),
|
||||||
|
@@ -9,6 +9,7 @@ Send 403 for auth error
|
|||||||
Report offline and other AJAX errors (bug #419)
|
Report offline and other AJAX errors (bug #419)
|
||||||
MySQL: Use utf8mb4 if available
|
MySQL: Use utf8mb4 if available
|
||||||
PostgreSQL: Materialized views
|
PostgreSQL: Materialized views
|
||||||
|
SQLite: Support CURRENT_* default values (bug #417)
|
||||||
Elasticsearch: Use where in select
|
Elasticsearch: Use where in select
|
||||||
Firebird: Alpha version
|
Firebird: Alpha version
|
||||||
Danish translation
|
Danish translation
|
||||||
|
Reference in New Issue
Block a user