Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

ability to move field after another when modifying it #923

Closed
wants to merge 1 commit into from

2 participants

@mlazarov

Easy way to rearange fields order

@mlazarov

Nobody likes this feature?

@narfbg
Owner

There's an issue that probably should be resolved first. Otherwise, it's a nice feature and since it's optional - it surely will be accepted. But you'll need to document it in the user guide and add a changelog entry.

@narfbg
Owner

Solved by b67277b.
Just add an 'after' => 'field_name' pair to the column definition array.

@narfbg narfbg closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jan 13, 2012
  1. @mlazarov
This page is out of date. Refresh to see the latest.
Showing with 2 additions and 2 deletions.
  1. +2 −2 system/database/DB_forge.php
View
4 system/database/DB_forge.php
@@ -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)
Something went wrong with that request. Please try again.