1
0
mirror of https://github.com/vrana/adminer.git synced 2025-08-07 15:16:44 +02:00

SQLite: Show primary key when altering indexes

This commit is contained in:
Jakub Vrana
2013-08-05 18:35:20 -07:00
parent 21dc4d939c
commit 3cf3560a20
2 changed files with 11 additions and 1 deletions

View File

@@ -318,7 +318,7 @@ if (isset($_GET["sqlite"]) || isset($_GET["sqlite2"])) {
}
}
if ($primary) {
$return[""] = array("type" => "PRIMARY", "columns" => $primary, "lengths" => array());
$return[""] = array("type" => "PRIMARY", "columns" => $primary, "lengths" => array()); //! column order, descending
}
$sqls = get_key_vals("SELECT name, sql FROM sqlite_master WHERE type = 'index' AND tbl_name = " . q($table));
foreach (get_rows("PRAGMA index_list(" . table($table) . ")") as $row) {