summaryrefslogtreecommitdiffstats
path: root/user_guide_src/source/installation/upgrade_300.rst
diff options
context:
space:
mode:
Diffstat (limited to 'user_guide_src/source/installation/upgrade_300.rst')
-rw-r--r--user_guide_src/source/installation/upgrade_300.rst32
1 files changed, 31 insertions, 1 deletions
diff --git a/user_guide_src/source/installation/upgrade_300.rst b/user_guide_src/source/installation/upgrade_300.rst
index 2bfb1bdbf..0af21b11e 100644
--- a/user_guide_src/source/installation/upgrade_300.rst
+++ b/user_guide_src/source/installation/upgrade_300.rst
@@ -284,4 +284,34 @@ should write '-' instead of 'dash' and '_' instead of 'underscore'.
in CodeIgniter 3.1+.
.. note:: These options are still available, but you're strongly encouraged to remove their usage
- sooner rather than later. \ No newline at end of file
+ sooner rather than later.
+
+Database Forge method add_column() with an AFTER clause
+=======================================================
+
+If you have used the **third parameter** for :doc:`Database Forge <database/forge>` method
+``add_column()`` to add a field for an AFTER clause, then you should change its usage.
+
+That third parameter has been deprecated and scheduled for removal in CodeIgniter 3.1+.
+
+You should now put AFTER clause field names in the field definition array instead::
+
+ // Old usage:
+ $field = array(
+ 'new_field' => array('type' => 'TEXT')
+ );
+
+ $this->dbforge->add_column('table_name', $field, 'another_field');
+
+ // New usage:
+ $field = array(
+ 'new_field' => array('type' => 'TEXT', 'after' => 'another_field')
+ );
+
+ $this->dbforge->add_column('table_name', $field);
+
+.. note:: The parameter is still available, but you're strongly encouraged to remove its usage
+ sooner rather than later.
+
+.. note:: This is for MySQL and CUBRID databases only! Other drivers don't support this
+ clause and will silently ignore it.