Welcome Guest, Not a member yet? Register   Sign In
dbforge add_column bug for postgres
#1

[eluser]Frank Wong[/eluser]
Found this error while trying to implement migration on a postgres database.

Issue: When trying to alter a table by adding a column, I would call the dbforge->add_column method and it then calls the _alter_table method in the database/drivers/postgre/postgre_forge.php file.

The call from dbforge->add_column
Code:
$sql = $this->_alter_table('ADD', $this->db->dbprefix.$table, $this->fields, $after_field);

The method definition
Code:
function _alter_table($alter_type, $table, $column_name, $column_definition = '', $default_value = '', $null = '', $after_field = '')

Problem: The definition is incorrectly overloaded. The logic might be incorrect also, but have not been verified.




Theme © iAndrew 2016 - Forum software by © MyBB