1
0
mirror of https://github.com/vrana/adminer.git synced 2025-08-07 23:27:17 +02:00

SQLite: Fix expressions in default values (bug #860)

This commit is contained in:
Jakub Vrana
2025-02-20 09:37:43 +01:00
parent e321a26ee5
commit f2e2c6e4ac
3 changed files with 4 additions and 2 deletions

View File

@@ -319,7 +319,7 @@ if (isset($_GET["sqlite"]) || isset($_GET["sqlite2"])) {
"field" => $name,
"type" => (preg_match('~int~i', $type) ? "integer" : (preg_match('~char|clob|text~i', $type) ? "text" : (preg_match('~blob~i', $type) ? "blob" : (preg_match('~real|floa|doub~i', $type) ? "real" : "numeric")))),
"full_type" => $type,
"default" => (preg_match("~'(.*)'~", $default, $match) ? str_replace("''", "'", $match[1]) : ($default == "NULL" ? null : $default)),
"default" => (preg_match("~^'(.*)'$~", $default, $match) ? str_replace("''", "'", $match[1]) : ($default == "NULL" ? null : $default)),
"null" => !$row["notnull"],
"privileges" => array("select" => 1, "insert" => 1, "update" => 1),
"primary" => $row["pk"],