コード例 #1
0
 /**
  * dropIndex
  *
  * @param string $name
  * @param bool   $constraint
  *
  * @return mixed
  */
 public function dropIndex($name, $constraint = false)
 {
     if ($constraint) {
         $query = PostgresqlQueryBuilder::dropConstraint($this->table, $name, true, 'RESTRICT');
     } else {
         $query = PostgresqlQueryBuilder::dropIndex($name, true);
     }
     $this->db->setQuery($query)->execute();
     return $this;
 }