diff options
author | Greg Aker <greg@gregaker.net> | 2011-09-23 10:41:08 +0200 |
---|---|---|
committer | Greg Aker <greg@gregaker.net> | 2011-09-23 10:41:08 +0200 |
commit | d295eea0ae492c0ccdb1488ed841b83f8160a2a7 (patch) | |
tree | 8b413fed0f990d02a385e641b1e33439b5adc762 /user_guide/database/forge.html | |
parent | 513f9a046aa48ae755cc2667f880c3996efe2f8a (diff) | |
parent | 19277f05c20a3de4beaebcac722659a0ed30a374 (diff) |
Merge pull request #476 from adrianmacneil/develop
Documented third $after_field parameter of dbforge->add_column()
Diffstat (limited to 'user_guide/database/forge.html')
-rw-r--r-- | user_guide/database/forge.html | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/user_guide/database/forge.html b/user_guide/database/forge.html index 6b8709892..528d1a24c 100644 --- a/user_guide/database/forge.html +++ b/user_guide/database/forge.html @@ -201,6 +201,10 @@ already be running, since the forge class relies on it.</p> $this->dbforge->add_column('table_name', $fields);<br /> <br /> // gives ALTER TABLE table_name ADD preferences TEXT</code></p> +<p>An optional third parameter can be used to specify which existing column to add the new column after.</p> +<p><code> +$this->dbforge->add_column('table_name', $fields, 'after_field'); +</code></p> <h2>$this->dbforge->drop_column()</h2> <p>Used to remove a column from a table. </p> <p><code>$this->dbforge->drop_column('table_name', 'column_to_drop');</code></p> |