]> git.joonet.de Git - adminer.git/commitdiff
Allow changing SQLite indexes with same name
authorJakub Vrana <jakub@vrana.cz>
Mon, 24 Jun 2013 17:04:07 +0000 (10:04 -0700)
committerJakub Vrana <jakub@vrana.cz>
Mon, 24 Jun 2013 17:04:07 +0000 (10:04 -0700)
adminer/drivers/sqlite.inc.php

index 9059451b604efae54dd70250a8ca7942fe339928..ff4c045280e76cce72de1cead507cbca82cd704d 100644 (file)
@@ -510,7 +510,7 @@ if (isset($_GET["sqlite"]) || isset($_GET["sqlite2"])) {
        }
        
        function alter_indexes($table, $alter) {
-               foreach ($alter as $val) {
+               foreach (array_reverse($alter) as $val) {
                        if (!queries($val[2] == "DROP"
                                ? "DROP INDEX " . idf_escape($val[1])
                                : index_sql($table, $val[0], $val[1], $val[2])