]> git.joonet.de Git - adminer.git/commitdiff
SQLite: Allow deleting PRIMARY KEY from tables with auto increment
authorJakub Vrana <jakub@vrana.cz>
Wed, 7 Feb 2018 13:47:29 +0000 (14:47 +0100)
committerJakub Vrana <jakub@vrana.cz>
Wed, 7 Feb 2018 13:47:29 +0000 (14:47 +0100)
adminer/drivers/sqlite.inc.php
changes.txt
todo.txt

index 5ffd531adb9751b1112fad4c7483f07de04469c4..457217263c2851b15ba189c4ac485011bbbaafbd 100644 (file)
@@ -507,6 +507,9 @@ if (isset($_GET["sqlite"]) || isset($_GET["sqlite2"])) {
                if ($table != "") {
                        if (!$fields) {
                                foreach (fields($table) as $key => $field) {
+                                       if ($indexes) {
+                                               $field["auto_increment"] = 0;
+                                       }
                                        $fields[] = process_field($field, $field);
                                        $originals[$key] = idf_escape($key);
                                }
index 626b3dd17914a7aa8c34942b1bdc4c09c0f96d92..fe6e1352d60a7e1eff085f729aaead8a32822cea 100644 (file)
@@ -1,6 +1,7 @@
 Adminer 4.6.1-dev:
 MySQL: Support non-utf8 charset in search in column
 MySQL: Support geometry in MySQL 8 (bug #574)
+SQLite: Allow deleting PRIMARY KEY from tables with auto increment
 PostgreSQL: Support binary files in bytea fields
 PostgreSQL: Cast to string when searching using LIKE (bug #325)
 PostgreSQL: Don't treat interval type as number (bug #474)
index 6cab06ca330e428d31dfeafbbccb8dacb64d09d6..bd43359e3bc53e1b89ffa71f992180472ad6c4fd 100644 (file)
--- a/todo.txt
+++ b/todo.txt
@@ -27,8 +27,6 @@ SQLite:
 Copy tables
 Delimiter in export and SQL command
 Backward keys in Editor
-Delete PRIMARY KEY from a table with auto increment
-"PRIMARY (`id`)" and "UNIQUE (id)" indexes shown for tables with auto increment
 
 PostgreSQL:
 Display number of schemas in databases overview