public function isSame(Index $other, $renamedColumns = null)
    {
        if ($renamedColumns) {
            $columns = [];
            foreach ($this->columns as $col) {
                $columns[] = isset($renamedColumns[$col]) ? $renamedColumns[$col]->name : $col;
            }
        } else {
            $columns = $this->columns;
        }
        if ($columns != $other->columns) {
            return false;
        }
        if ($this->name == self::PRIMARY || $other->name == self::PRIMARY) {
            return $this->name == $other->name;
        } else {
            return $this->type == $other->type;
        }
    }