/** * Get existing indexes for a table * * @param string $table * @return string[] */ public function getExistingIndexes($table) { $rows = $this->db->fetchAsAssoc("SHOW INDEXES FROM " . $this->db->quote($table)); $arr = array(); foreach ($rows as $row) { $arr[$row["Key_name"]] = $row["Key_name"]; } return $arr; }