Allow changing SQLite indexes with same name
This commit is contained in:
parent
e51640eb98
commit
7dd454f0b4
|
@ -510,7 +510,7 @@ if (isset($_GET["sqlite"]) || isset($_GET["sqlite2"])) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function alter_indexes($table, $alter) {
|
function alter_indexes($table, $alter) {
|
||||||
foreach ($alter as $val) {
|
foreach (array_reverse($alter) as $val) {
|
||||||
if (!queries($val[2] == "DROP"
|
if (!queries($val[2] == "DROP"
|
||||||
? "DROP INDEX " . idf_escape($val[1])
|
? "DROP INDEX " . idf_escape($val[1])
|
||||||
: index_sql($table, $val[0], $val[1], $val[2])
|
: index_sql($table, $val[0], $val[1], $val[2])
|
||||||
|
|
Loading…
Reference in a new issue