diff options
author | Andrey Andreev <narf@bofh.bg> | 2012-11-12 11:51:14 +0100 |
---|---|---|
committer | Andrey Andreev <narf@bofh.bg> | 2012-11-12 11:51:14 +0100 |
commit | b67277b8063b0e6aab051ce269194255ef83e808 (patch) | |
tree | f0ce631b9ee3134de2cf009e4d5f02401f31aaac /user_guide_src/source/installation/upgrade_300.rst | |
parent | b0a97c100f5e7edc5e21ec7d07f768cd3b5618da (diff) |
Bring back the AFTER clause for DB Forge add_column()
(it was temporarily removed due to multiple inconsistencies with other drivers)
This commit also fixes issue #1988.
Also added support for the FIRST clause (again, MySQL and CUBRID only).
Diffstat (limited to 'user_guide_src/source/installation/upgrade_300.rst')
-rw-r--r-- | user_guide_src/source/installation/upgrade_300.rst | 32 |
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. |