/** * test drop column */ public function test_remove_column() { //create it $this->adapter->execute_ddl("CREATE TABLE `users` ( name varchar(20), age int(3) );"); //verify it exists $col = $this->adapter->column_info("users", "name"); $this->assertEquals("name", $col['field']); //drop it $this->adapter->remove_column("users", "name"); //verify it does not exist $col = $this->adapter->column_info("users", "name"); $this->assertEquals(null, $col); $this->remove_table('users'); }
/** * Remove a column * * @param string $table_name the name of the table * @param string $column_name the column name * * @return boolean */ public function remove_column($table_name, $column_name) { return $this->_adapter->remove_column($table_name, $column_name); }