mirror of
https://github.com/vrana/adminer.git
synced 2025-08-08 23:57:29 +02:00
SQLite doesn't support primary key modification
This commit is contained in:
@@ -429,7 +429,7 @@ if (isset($_GET["sqlite"]) || isset($_GET["sqlite2"])) {
|
|||||||
|
|
||||||
function alter_indexes($table, $alter) {
|
function alter_indexes($table, $alter) {
|
||||||
foreach ($alter as $val) {
|
foreach ($alter as $val) {
|
||||||
if (!queries(($val[2] ? "DROP INDEX" : "CREATE" . ($val[0] != "INDEX" ? " UNIQUE" : "") . " INDEX " . idf_escape(uniqid($table . "_")) . " ON " . table($table)) . " $val[1]")) { //! primary key must be created in CREATE TABLE
|
if (!queries(($val[2] ? "DROP INDEX" : "CREATE" . ($val[0] != "INDEX" ? " UNIQUE" : "") . " INDEX " . idf_escape(uniqid($table . "_")) . " ON " . table($table)) . " $val[1]")) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -6,6 +6,10 @@ if (ereg("MyISAM|Maria", $table_status["Engine"])) {
|
|||||||
$index_types[] = "FULLTEXT";
|
$index_types[] = "FULLTEXT";
|
||||||
}
|
}
|
||||||
$indexes = indexes($TABLE);
|
$indexes = indexes($TABLE);
|
||||||
|
if ($jush == "sqlite") { // doesn't support primary key
|
||||||
|
unset($index_types[0]);
|
||||||
|
unset($indexes[""]);
|
||||||
|
}
|
||||||
if ($_POST && !$error && !$_POST["add"]) {
|
if ($_POST && !$error && !$_POST["add"]) {
|
||||||
$alter = array();
|
$alter = array();
|
||||||
foreach ($_POST["indexes"] as $index) {
|
foreach ($_POST["indexes"] as $index) {
|
||||||
|
1
todo.txt
1
todo.txt
@@ -26,6 +26,7 @@ Saving of MySQL 5 BIT data type - don't use quote()
|
|||||||
? Geometry support
|
? Geometry support
|
||||||
|
|
||||||
SQLite:
|
SQLite:
|
||||||
|
ASC and DESC instead of text length in index
|
||||||
Delimiter in export and SQL command
|
Delimiter in export and SQL command
|
||||||
Backward keys in Editor
|
Backward keys in Editor
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user