diff --git a/adminer/db.inc.php b/adminer/db.inc.php index 5cf3b8cd..0799008d 100644 --- a/adminer/db.inc.php +++ b/adminer/db.inc.php @@ -27,6 +27,12 @@ if ($tables_views && !$error && !$_POST["search"]) { $result = drop_tables($_POST["tables"]); } $message = lang('Tables have been dropped.'); + } elseif ($jush == "sqlite" && $_POST["check"]) { + foreach ((array) $_POST["tables"] as $table) { + foreach (get_rows("PRAGMA integrity_check(" . q($table) . ")") as $row) { + $message .= "" . h($table) . ": " . h($row["integrity_check"]) . "
"; + } + } } elseif ($jush != "sql") { $result = ($jush == "sqlite" ? queries("VACUUM") @@ -127,9 +133,10 @@ if ($adminer->homepage()) { $vacuum = " " . on_help("'VACUUM'"); $optimize = " " . on_help($jush == "sql" ? "'OPTIMIZE TABLE'" : "'VACUUM OPTIMIZE'"); echo "
" . lang('Selected') . "
" - . ($jush == "sqlite" ? $vacuum + . ($jush == "sqlite" ? $vacuum . " " . on_help("'PRAGMA integrity_check'") : ($jush == "pgsql" ? $vacuum . $optimize - : ($jush == "sql" ? " " . on_help("'ANALYZE TABLE'") . $optimize + : ($jush == "sql" ? " " . on_help("'ANALYZE TABLE'") + . $optimize . " " . on_help("'CHECK TABLE'") . " " . on_help("'REPAIR TABLE'") : ""))) diff --git a/changes.txt b/changes.txt index 46446d73..576139b8 100644 --- a/changes.txt +++ b/changes.txt @@ -1,4 +1,5 @@ Adminer-4.17.2-dev: +SQLite: Add command Check tables MongoDB: Remove support for deprecated extension mongo Adminer-4.17.1 (released 2025-02-25):