CodeIgniter
CodeIgniter copied to clipboard
dbforge driver constraint value implementation inconsistency
There is a conflict between the dbforge drivers concerning the method for declaring your constraint values for Numeric, ENUM and SET types.
The mysql driver and the cubrid driver are coded to expect an array type, as per documentation.
All the other drivers expect a string. We discovered it when we switched our application driver to mysqli from mysql, it broke our migrations!
Which version of CodeIgniter? Can you point to a particular line, method, file?
There's no real difference between the two in our latest code:
$ diff -Naur system/database/drivers/mysqli/mysqli_forge.php system/database/drivers/mysql/mysql_forge.php
--- system/database/drivers/mysqli/mysqli_forge.php 2013-11-05 16:40:03.106361861 +0200
+++ system/database/drivers/mysql/mysql_forge.php 2013-11-05 16:40:03.098361860 +0200
@@ -27,13 +27,13 @@
defined('BASEPATH') OR exit('No direct script access allowed');
/**
- * MySQLi Forge Class
+ * MySQL Forge Class
*
* @category Database
* @author EllisLab Dev Team
* @link http://codeigniter.com/user_guide/database/
*/
-class CI_DB_mysqli_forge extends CI_DB_forge {
+class CI_DB_mysql_forge extends CI_DB_forge {
/**
* CREATE DATABASE statement
@@ -211,5 +211,5 @@
}
-/* End of file mysqli_forge.php */
-/* Location: ./system/database/drivers/mysqli/mysqli_forge.php */
\ No newline at end of file
+/* End of file mysql_forge.php */
+/* Location: ./system/database/drivers/mysql/mysql_forge.php */
\ No newline at end of file