Skip to content

Commit

Permalink
Change $i to $keyName
Browse files Browse the repository at this point in the history
  • Loading branch information
sclubricants committed Oct 7, 2022
1 parent ea2d0f3 commit 377bd96
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions system/Database/SQLite3/Table.php
Original file line number Diff line number Diff line change
Expand Up @@ -261,18 +261,18 @@ protected function createTable()

// Unique/Index keys
if (is_array($this->keys)) {
foreach ($this->keys as $i => $key) {
foreach ($this->keys as $keyName => $key) {
switch ($key['type']) {
case 'primary':
$this->forge->addPrimaryKey($key['fields']);
break;

case 'unique':
$this->forge->addUniqueKey($key['fields'], $i);
$this->forge->addUniqueKey($key['fields'], $keyName);
break;

case 'index':
$this->forge->addKey($key['fields'], false, false, $i);
$this->forge->addKey($key['fields'], false, false, $keyName);
break;
}
}
Expand Down

0 comments on commit 377bd96

Please sign in to comment.