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 /system/database/drivers/odbc | |
parent | 16629b1cef61db05646839d6789d98ddc5aaf16b (diff) |
Added rename_table() into DBForge.
Diffstat (limited to 'system/database/drivers/odbc')
-rw-r--r-- | system/database/drivers/odbc/odbc_forge.php | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/system/database/drivers/odbc/odbc_forge.php b/system/database/drivers/odbc/odbc_forge.php index 374c15fcd..66e1722d8 100644 --- a/system/database/drivers/odbc/odbc_forge.php +++ b/system/database/drivers/odbc/odbc_forge.php @@ -232,5 +232,25 @@ class CI_DB_odbc_forge extends CI_DB_forge { }
+
+ // --------------------------------------------------------------------
+
+ /**
+ * Rename a table
+ *
+ * Generates a platform-specific query so that a table can be renamed
+ *
+ * @access private
+ * @param string the old table name
+ * @param string the new table name
+ * @return string
+ */
+ function _rename_table($table_name, $new_table_name)
+ {
+ $sql = 'ALTER TABLE '.$this->db->_protect_identifiers($table_name)." RENAME TO ".$this->db->_protect_identifiers($new_table_name);
+ return $sql;
+ }
+
+
}
?>
\ No newline at end of file |