diff options
author | Derek Allard <derek.allard@ellislab.com> | 2008-04-07 16:01:01 +0200 |
---|---|---|
committer | Derek Allard <derek.allard@ellislab.com> | 2008-04-07 16:01:01 +0200 |
commit | 2385d30422b865052bbc6f333e6a189f46215a61 (patch) | |
tree | 396a5623d07b711ab1da0f92a61d1276f80d9fce /user_guide | |
parent | 16629b1cef61db05646839d6789d98ddc5aaf16b (diff) |
Added rename_table() into DBForge.
Diffstat (limited to 'user_guide')
-rw-r--r-- | user_guide/changelog.html | 3 | ||||
-rw-r--r-- | user_guide/database/forge.html | 11 |
2 files changed, 10 insertions, 4 deletions
diff --git a/user_guide/changelog.html b/user_guide/changelog.html index 1efaa6b2a..5a8d0edb4 100644 --- a/user_guide/changelog.html +++ b/user_guide/changelog.html @@ -62,7 +62,8 @@ Change Log <ul>
<li>Active Record
<ul>
- <li>Added the ability to prevent escaping in having() clauses.</li>
+ <li>Added the ability to prevent escaping in <kbd>having()</kbd> clauses.</li>
+ <li>Added <kbd>rename_table()</kbd> into <a href="./database/forge.html">DBForge</a>.</li>
<li>Fixed a bug that wasn't allowing escaping to be turned off if the value of a query was NULL.</li>
</ul>
</li>
diff --git a/user_guide/database/forge.html b/user_guide/database/forge.html index f21591c7f..655ab96c1 100644 --- a/user_guide/database/forge.html +++ b/user_guide/database/forge.html @@ -71,6 +71,7 @@ Database Forge Class <li><a href="#add_key">Adding Keys</a></li>
<li><a href="#create_table">Creating a Table</a></li>
<li><a href="#drop_table">Dropping a Table</a></li>
+<li><a href="#rename_table">Renaming a Table</a></li>
<li><a href="#modifying_tables">Modifying a Table</a></li>
</ul>
@@ -168,7 +169,7 @@ already be running, since the forge class relies on it.</p> <br />
$this->dbforge->add_key('blog_name');<br />
// gives KEY (blog_name)</code></p>
-<h2><a name="create_table" id="create_table2"></a>Creating a table</h2>
+<h2><a name="create_table" id="create_table"></a>Creating a table</h2>
<p>After fields and keys have been declared, you can create a new table with</p>
<p><code>$this->dbforge->create_table('table_name');<br />
// gives CREATE TABLE table_name</code></p>
@@ -178,8 +179,12 @@ already be running, since the forge class relies on it.</p> <h2><a name="drop_table" id="drop_table"></a>Dropping a table</h2>
<p>Executes a DROP TABLE sql</p>
<p><code>$this->dbforge->drop_table('table_name');<br />
-// gives DROP TABLE IF EXISTS table_name</code></p>
-<h1><a name="modifying_tables" id="drop_table2"></a>Modifying Tables</h1>
+ // gives DROP TABLE IF EXISTS table_name</code></p>
+<h2><a name="rename_table" id="rename_table"></a>Renaming a table</h2>
+<p>Executes a TABLE rename</p>
+<p><code>$this->dbforge->rename_table('old_table_name', 'new_table_name');<br />
+ // gives ALTER TABLE old_table_name RENAME TO new_table_name</code></p>
+<h1><a name="modifying_tables" id="modifying_tables"></a>Modifying Tables</h1>
<h2>$this->dbforge->add_column()</h2>
<p>The add_column() function is used to modify an existing table. It accepts the same field array as above, and can be used for an unlimited number of additional fields.</p>
<p><code>$fields = array(<br />
|