From 87ada0ab56596fbd988757b006c2c5981ce517be Mon Sep 17 00:00:00 2001 From: jakubvrana Date: Fri, 30 May 2008 07:08:11 +0000 Subject: [PATCH] Maintain auto_increment when moving columns (spotted by jenik) git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@420 7c3ca157-0c34-0410-bff1-cbf682f78f5c --- create.inc.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/create.inc.php b/create.inc.php index 73f378ca..5dd31ce3 100644 --- a/create.inc.php +++ b/create.inc.php @@ -67,10 +67,10 @@ $result->free(); if ($_POST) { $row = $_POST; - process_fields($row["fields"]); if ($row["auto_increment_col"]) { - $row["fields"][$row["auto_increment_col"] - 1]["auto_increment"] = true; + $row["fields"][$row["auto_increment_col"]]["auto_increment"] = true; } + process_fields($row["fields"]); } elseif (strlen($_GET["create"])) { $row = table_status($_GET["create"]); if ($row["Engine"] == "InnoDB") {