summaryrefslogtreecommitdiffstats
path: root/system/database/drivers/sqlite/sqlite_forge.php
diff options
context:
space:
mode:
authorAndrey Andreev <narf@bofh.bg>2012-04-27 11:15:47 +0200
committerAndrey Andreev <narf@bofh.bg>2012-04-27 11:15:47 +0200
commit5815dba069428514ce39e745328a898fc877773f (patch)
tree9ba5c1dc7bef0458c5f89e573f1b2acf05f3c688 /system/database/drivers/sqlite/sqlite_forge.php
parent9c9591c9b4a1d7ac412f7a85aeb5c92f50aa3490 (diff)
parentced2c9ab41450cb632c042730604111ec2a24e1f (diff)
Merge upstream branch
Diffstat (limited to 'system/database/drivers/sqlite/sqlite_forge.php')
-rw-r--r--system/database/drivers/sqlite/sqlite_forge.php38
1 files changed, 5 insertions, 33 deletions
diff --git a/system/database/drivers/sqlite/sqlite_forge.php b/system/database/drivers/sqlite/sqlite_forge.php
index 70bb6a70b..ce8eac91e 100644
--- a/system/database/drivers/sqlite/sqlite_forge.php
+++ b/system/database/drivers/sqlite/sqlite_forge.php
@@ -40,7 +40,7 @@ class CI_DB_sqlite_forge extends CI_DB_forge {
* @param string the database name
* @return bool
*/
- public function _create_database()
+ public function create_database($db_name = '')
{
// In SQLite, a database is created when you connect to the database.
// We'll return TRUE so that an error isn't generated
@@ -52,10 +52,10 @@ class CI_DB_sqlite_forge extends CI_DB_forge {
/**
* Drop database
*
- * @param string the database name
+ * @param string the database name (ignored)
* @return bool
*/
- public function _drop_database($name)
+ public function drop_database($db_name = '')
{
if ( ! @file_exists($this->db->database) OR ! @unlink($this->db->database))
{
@@ -77,7 +77,7 @@ class CI_DB_sqlite_forge extends CI_DB_forge {
* @param bool should 'IF NOT EXISTS' be added to the SQL
* @return bool
*/
- public function _create_table($table, $fields, $primary_keys, $keys, $if_not_exists)
+ protected function _create_table($table, $fields, $primary_keys, $keys, $if_not_exists)
{
$sql = 'CREATE TABLE ';
@@ -147,18 +147,6 @@ class CI_DB_sqlite_forge extends CI_DB_forge {
// --------------------------------------------------------------------
/**
- * Drop Table
- *
- * @return string
- */
- public function _drop_table($table)
- {
- return 'DROP TABLE '.$table.' IF EXISTS';
- }
-
- // --------------------------------------------------------------------
-
- /**
* Alter table query
*
* Generates a platform-specific query so that a table can be altered
@@ -173,7 +161,7 @@ class CI_DB_sqlite_forge extends CI_DB_forge {
* @param string the field after which we should add the new field
* @return string
*/
- public function _alter_table($alter_type, $table, $column_name, $column_definition = '', $default_value = '', $null = '', $after_field = '')
+ protected function _alter_table($alter_type, $table, $column_name, $column_definition = '', $default_value = '', $null = '', $after_field = '')
{
/* SQLite only supports adding new columns and it does
* NOT support the AFTER statement. Each new column will
@@ -192,22 +180,6 @@ class CI_DB_sqlite_forge extends CI_DB_forge {
.(($null !== NULL && $default_value !== 'NULL') ? ' NOT NULL' : ' NULL');
}
- // --------------------------------------------------------------------
-
- /**
- * Rename a table
- *
- * Generates a platform-specific query so that a table can be renamed
- *
- * @param string the old table name
- * @param string the new table name
- * @return string
- */
- public function _rename_table($table_name, $new_table_name)
- {
- return 'ALTER TABLE '.$this->db->protect_identifiers($table_name).' RENAME TO '.$this->db->protect_identifiers($new_table_name);
- }
-
}
/* End of file sqlite_forge.php */