From: Jakub Vrana Date: Sat, 25 Oct 2014 23:49:42 +0000 (-0700) Subject: SQLite: Support CURRENT_* default values (bug #417) X-Git-Tag: v4.2.0~24 X-Git-Url: https://git.joonet.de/?a=commitdiff_plain;h=5dc5bfe7fff7c59b8cfda84c9fcf322733793af8;p=adminer.git SQLite: Support CURRENT_* default values (bug #417) --- diff --git a/adminer/include/editing.inc.php b/adminer/include/editing.inc.php index 3babfaa2..e46ba47d 100644 --- a/adminer/include/editing.inc.php +++ b/adminer/include/editing.inc.php @@ -196,6 +196,7 @@ function process_field($field, $type_field) { ($field["null"] ? " NULL" : " NOT NULL"), // NULL for timestamp (isset($default) ? " 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)) || ($jush == "pgsql" && preg_match("~^[a-z]+\\(('[^']*')+\\)\$~", $default)) ? $default : q($default)) : ""), diff --git a/changes.txt b/changes.txt index 690a0643..f0c1973e 100644 --- a/changes.txt +++ b/changes.txt @@ -9,6 +9,7 @@ Send 403 for auth error Report offline and other AJAX errors (bug #419) MySQL: Use utf8mb4 if available PostgreSQL: Materialized views +SQLite: Support CURRENT_* default values (bug #417) Elasticsearch: Use where in select Firebird: Alpha version Danish translation