Update to CodeIgniter 3.19
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
*
|
||||
* This content is released under the MIT License (MIT)
|
||||
*
|
||||
* Copyright (c) 2014 - 2016, British Columbia Institute of Technology
|
||||
* Copyright (c) 2014 - 2018, British Columbia Institute of Technology
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
@@ -29,7 +29,7 @@
|
||||
* @package CodeIgniter
|
||||
* @author EllisLab Dev Team
|
||||
* @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/)
|
||||
* @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/)
|
||||
* @copyright Copyright (c) 2014 - 2018, British Columbia Institute of Technology (http://bcit.ca/)
|
||||
* @license http://opensource.org/licenses/MIT MIT License
|
||||
* @link https://codeigniter.com
|
||||
* @since Version 1.4.1
|
||||
@@ -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
|
||||
*
|
||||
@@ -117,8 +124,10 @@ class CI_DB_oci8_forge extends CI_DB_forge {
|
||||
if ($alter_type === 'MODIFY' && ! empty($field[$i]['new_name']))
|
||||
{
|
||||
$sqls[] = $sql.' RENAME COLUMN '.$this->db->escape_identifiers($field[$i]['name'])
|
||||
.' '.$this->db->escape_identifiers($field[$i]['new_name']);
|
||||
.' TO '.$this->db->escape_identifiers($field[$i]['new_name']);
|
||||
}
|
||||
|
||||
$field[$i] = "\n\t".$field[$i]['_literal'];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -129,7 +138,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;
|
||||
}
|
||||
|
||||
// --------------------------------------------------------------------
|
||||
@@ -146,4 +155,33 @@ 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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user