diff options
Diffstat (limited to 'system/database/drivers/sqlite')
-rw-r--r-- | system/database/drivers/sqlite/sqlite_driver.php | 20 | ||||
-rw-r--r-- | system/database/drivers/sqlite/sqlite_forge.php | 22 |
2 files changed, 21 insertions, 21 deletions
diff --git a/system/database/drivers/sqlite/sqlite_driver.php b/system/database/drivers/sqlite/sqlite_driver.php index 46e0fae49..782156949 100644 --- a/system/database/drivers/sqlite/sqlite_driver.php +++ b/system/database/drivers/sqlite/sqlite_driver.php @@ -113,7 +113,7 @@ class CI_DB_sqlite_driver extends CI_DB { */
function db_set_charset($charset, $collation)
{
- // TODO - add support if needed
+ // @todo - add support if needed
return TRUE;
}
@@ -651,24 +651,6 @@ class CI_DB_sqlite_driver extends CI_DB { @sqlite_close($conn_id);
}
- // --------------------------------------------------------------------
-
- /**
- * 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;
- }
-
}
diff --git a/system/database/drivers/sqlite/sqlite_forge.php b/system/database/drivers/sqlite/sqlite_forge.php index 05f366a6f..631c9c771 100644 --- a/system/database/drivers/sqlite/sqlite_forge.php +++ b/system/database/drivers/sqlite/sqlite_forge.php @@ -144,7 +144,7 @@ class CI_DB_sqlite_forge extends CI_DB_forge { $primary_keys = $this->db->_protect_identifiers($primary_keys);
$sql .= ",\n\tPRIMARY KEY (" . implode(', ', $primary_keys) . ")";
}
-
+
if (is_array($keys) && count($keys) > 0)
{
foreach ($keys as $key)
@@ -161,7 +161,7 @@ class CI_DB_sqlite_forge extends CI_DB_forge { $sql .= ",\n\tUNIQUE (" . implode(', ', $key) . ")";
}
}
-
+
$sql .= "\n)";
return $sql;
@@ -241,6 +241,24 @@ class CI_DB_sqlite_forge extends CI_DB_forge { return $sql;
}
+
+ // --------------------------------------------------------------------
+
+ /**
+ * 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;
+ }
}
/* End of file sqlite_forge.php */
|