/** * test remove index with custom index name */ public function test_remove_index_with_custom_index_name() { //create it $table = $this->adapter->create_table('users'); $table->column('name', 'string', array('limit' => 20)); $table->column('age', 'integer'); $table->finish(); $this->adapter->add_index("users", "name", array('name' => 'my_special_index')); $this->assertEquals(true, $this->adapter->has_index("users", "name", array('name' => 'my_special_index'))); //drop it $this->adapter->remove_index("users", "name", array('name' => 'my_special_index')); $this->assertEquals(false, $this->adapter->has_index("users", "name", array('name' => 'my_special_index'))); $this->drop_table('users'); }
/** * Remove an index * * @param string $table_name the name of the table * @param string $column_name the column name * @param array|string $options * * @return boolean */ public function remove_index($table_name, $column_name, $options = array()) { return $this->_adapter->remove_index($table_name, $column_name, $options); }