From a09b96900af8615f4bb0b50046588fb3d5e5db84 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Tue, 28 Jun 2016 11:06:47 +0300 Subject: Merge pull request #4678 from kenjis/fix-oci8_forge DBForge adjustments for Oracle --- system/database/drivers/oci8/oci8_forge.php | 37 +++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) (limited to 'system/database/drivers/oci8') diff --git a/system/database/drivers/oci8/oci8_forge.php b/system/database/drivers/oci8/oci8_forge.php index 1ca559a32..989c7a8b7 100644 --- a/system/database/drivers/oci8/oci8_forge.php +++ b/system/database/drivers/oci8/oci8_forge.php @@ -53,6 +53,13 @@ class CI_DB_oci8_forge extends CI_DB_forge { */ protected $_create_database = FALSE; + /** + * CREATE TABLE IF statement + * + * @var string + */ + protected $_create_table_if = FALSE; + /** * DROP DATABASE statement * @@ -146,4 +153,34 @@ class CI_DB_oci8_forge extends CI_DB_forge { // Not supported - sequences and triggers must be used instead } + // -------------------------------------------------------------------- + + /** + * Field attribute TYPE + * + * Performs a data type mapping between different databases. + * + * @param array &$attributes + * @return void + */ + protected function _attr_type(&$attributes) + { + switch (strtoupper($attributes['TYPE'])) + { + case 'TINYINT': + $attributes['TYPE'] = 'NUMBER'; + return; + case 'MEDIUMINT': + $attributes['TYPE'] = 'NUMBER'; + return; + case 'INT': + $attributes['TYPE'] = 'NUMBER'; + return; + case 'BIGINT': + $attributes['TYPE'] = 'NUMBER'; + return; + default: return; + } + } + } -- cgit v1.2.3-24-g4f1b