From 2385d30422b865052bbc6f333e6a189f46215a61 Mon Sep 17 00:00:00 2001 From: Derek Allard Date: Mon, 7 Apr 2008 14:01:01 +0000 Subject: Added rename_table() into DBForge. --- user_guide/changelog.html | 3 ++- user_guide/database/forge.html | 11 ++++++++--- 2 files changed, 10 insertions(+), 4 deletions(-) (limited to 'user_guide') 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 @@ -168,7 +169,7 @@ already be running, since the forge class relies on it.


$this->dbforge->add_key('blog_name');
// gives KEY (blog_name)

-

Creating a table

+

Creating a table

After fields and keys have been declared, you can create a new table with

$this->dbforge->create_table('table_name');
// gives CREATE TABLE table_name

@@ -178,8 +179,12 @@ already be running, since the forge class relies on it.

Dropping a table

Executes a DROP TABLE sql

$this->dbforge->drop_table('table_name');
-// gives DROP TABLE IF EXISTS table_name

-

Modifying Tables

+ // gives DROP TABLE IF EXISTS table_name

+

Renaming a table

+

Executes a TABLE rename

+

$this->dbforge->rename_table('old_table_name', 'new_table_name');
+ // gives ALTER TABLE old_table_name RENAME TO new_table_name

+

Modifying Tables

$this->dbforge->add_column()

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.

$fields = array(
-- cgit v1.2.3-24-g4f1b