ability to move field after another when modifying it #923

Closed
wants to merge 1 commit into
from
@@ -294,7 +294,7 @@ public function drop_column($table = '', $column_name = '')
* @param string the column definition
* @return bool
*/
- public function modify_column($table = '', $field = array())
+ public function modify_column($table = '', $field = array(), $after_field = '')
{
if ($table == '')
{
@@ -317,7 +317,7 @@ public function modify_column($table = '', $field = array())
show_error('Field information is required.');
}
- $sql = $this->_alter_table('CHANGE', $this->db->dbprefix.$table, $this->fields);
+ $sql = $this->_alter_table('CHANGE', $this->db->dbprefix.$table, $this->fields, $after_field);
$this->_reset();
if ($this->db->query($sql) === FALSE)