From 03261f2dbd58c53a4af1e5a2064ff3aab9d1656b Mon Sep 17 00:00:00 2001 From: "John Paul E. Balandan, CPA" Date: Fri, 6 Aug 2021 12:47:38 +0800 Subject: [PATCH] Try use array_unique on index keys --- system/Database/Forge.php | 1 + 1 file changed, 1 insertion(+) diff --git a/system/Database/Forge.php b/system/Database/Forge.php index c95ced88c4d6..44373452465e 100644 --- a/system/Database/Forge.php +++ b/system/Database/Forge.php @@ -324,6 +324,7 @@ public function addKey($key, bool $primary = false, bool $unique = false) } } else { $this->keys[] = $key; + $this->keys = array_unique($this->keys, SORT_REGULAR); if ($unique) { $this->uniqueKeys[] = count($this->keys) - 1;