Skip to content

Commit

Permalink
Try use array_unique on index keys
Browse files Browse the repository at this point in the history
  • Loading branch information
paulbalandan committed Aug 6, 2021
1 parent 1ee903b commit 03261f2
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions system/Database/Forge.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 03261f2

Please sign in to comment.