summaryrefslogtreecommitdiffstats
path: root/system/database/DB_forge.php
diff options
context:
space:
mode:
Diffstat (limited to 'system/database/DB_forge.php')
-rw-r--r--system/database/DB_forge.php21
1 files changed, 21 insertions, 0 deletions
diff --git a/system/database/DB_forge.php b/system/database/DB_forge.php
index cd468bc6a..5f25ebedc 100644
--- a/system/database/DB_forge.php
+++ b/system/database/DB_forge.php
@@ -209,6 +209,27 @@ class CI_DB_forge {
// --------------------------------------------------------------------
/**
+ * Rename Table
+ *
+ * @access public
+ * @param string the old table name
+ * @param string the new table name
+ * @return bool
+ */
+ function rename_table($table_name, $new_table_name)
+ {
+ if ($table_name == '' OR $new_table_name == '')
+ {
+ show_error('A table name is required for that operation.');
+ }
+
+ $sql = $this->_rename_table($table_name, $new_table_name);
+ return $this->db->query($sql);
+ }
+
+ // --------------------------------------------------------------------
+
+ /**
* Column Add
*
* @access public