Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

ability to move field after another when modifying it #923

Closed
wants to merge 1 commit into from

2 participants

Martin Lazarov Andrey Andreev
Martin Lazarov

Easy way to rearange fields order

Martin Lazarov

Nobody likes this feature?

Andrey Andreev
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.

Andrey Andreev
Owner

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

Andrey Andreev 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. Martin Lazarov
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
4 system/database/DB_forge.php
View
@@ -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.