From d24dbe9d42a2dc0dce95339bd351d3a130a81c23 Mon Sep 17 00:00:00 2001 From: ytetsuro Date: Mon, 26 Dec 2016 12:30:32 +0900 Subject: oci8_forge add column bug fix Notice Error Array to string conversion $this->dbforge->add_column('sample', [ 'column_name1' => [ 'type' => 'char', 'default' => '0' ], 'column_name2' => [ 'type' => 'char', 'default' => '0' ] ]); --- system/database/drivers/oci8/oci8_forge.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'system/database/drivers') diff --git a/system/database/drivers/oci8/oci8_forge.php b/system/database/drivers/oci8/oci8_forge.php index ac33cde0c..33f2ce228 100644 --- a/system/database/drivers/oci8/oci8_forge.php +++ b/system/database/drivers/oci8/oci8_forge.php @@ -126,6 +126,7 @@ class CI_DB_oci8_forge extends CI_DB_forge { $sqls[] = $sql.' RENAME COLUMN '.$this->db->escape_identifiers($field[$i]['name']) .' '.$this->db->escape_identifiers($field[$i]['new_name']); } + $field[$i] = $field[$i]['_literal']; } } @@ -136,7 +137,7 @@ class CI_DB_oci8_forge extends CI_DB_forge { // RENAME COLUMN must be executed after MODIFY array_unshift($sqls, $sql); - return $sql; + return $sqls; } // -------------------------------------------------------------------- -- cgit v1.2.3-24-g4f1b