]> git.joonet.de Git - adminer.git/commitdiff
SQLite: Support CURRENT_* default values (bug #417)
authorJakub Vrana <jakub@vrana.cz>
Sat, 25 Oct 2014 23:49:42 +0000 (16:49 -0700)
committerJakub Vrana <jakub@vrana.cz>
Sat, 25 Oct 2014 23:49:42 +0000 (16:49 -0700)
adminer/include/editing.inc.php
changes.txt

index 3babfaa2ccc919a033a97ca84f8496f4386c935d..e46ba47d755f896742fee0b7b4bbc49c93581794 100644 (file)
@@ -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)) : ""),
index 690a06437347ff3fb33999b591c582f210539767..f0c1973ecde498c8468227ca01c15977a3c72021 100644 (file)
@@ -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