code: private function removeDuplicates(array $foreignKeys)
      {
          $fks = [];
          foreach ($foreignKeys as $foreignKey) {
              $fks[implode('__`__', $foreignKey->getLocalColumns())] = $foreignKey;
          }
  
          return array_values($fks);
      }
docs: Remove duplicate foreign keys (assumes that all foreign yes are from the same local table).
  
  @param ForeignKeyConstraint[] $foreignKeys
  @return ForeignKeyConstraint[]