From 7e1ae1b4579c4e7ca271678fadec1e7032eb2ada Mon Sep 17 00:00:00 2001 From: Alan Knowles Date: Thu, 27 Jan 2011 23:27:17 +0800 Subject: [PATCH] inc/DBSchema/mysql.php --- inc/DBSchema/mysql.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inc/DBSchema/mysql.php b/inc/DBSchema/mysql.php index afb2dc61..ff8f9789 100644 --- a/inc/DBSchema/mysql.php +++ b/inc/DBSchema/mysql.php @@ -50,7 +50,7 @@ class MTrackDBSchema_mysql extends MTrackDBSchema_Generic if (is_array($table->keys)) { - foreach ($table->keys as $k) { + foreach ($table->keys as $kn=>$k) { if ($k->type != 'primary') continue; if ($pri_key !== null) continue; $sql[] = "\tprimary key (" . join(', ', $k->fields) . ")"; -- 2.39.2