summaryrefslogtreecommitdiffstats
path: root/system/database/drivers/sqlsrv/sqlsrv_forge.php
diff options
context:
space:
mode:
authorAndrey Andreev <narf@bofh.bg>2012-06-07 15:13:54 +0200
committerAndrey Andreev <narf@bofh.bg>2012-06-07 15:13:54 +0200
commit1f26edc61f314a74cd93fcdf688b3780734e0e96 (patch)
tree2dbc6871e50efea84e94e83a268094a1615c147c /system/database/drivers/sqlsrv/sqlsrv_forge.php
parent596c51cdca8d623c96243a81bc5212d34f820a97 (diff)
Added a work-around for MSSQL/SQLSRV create_table() with INT column types (column lengths are not supported)
Diffstat (limited to 'system/database/drivers/sqlsrv/sqlsrv_forge.php')
-rw-r--r--system/database/drivers/sqlsrv/sqlsrv_forge.php1
1 files changed, 1 insertions, 0 deletions
diff --git a/system/database/drivers/sqlsrv/sqlsrv_forge.php b/system/database/drivers/sqlsrv/sqlsrv_forge.php
index 1529b2a21..bd107476e 100644
--- a/system/database/drivers/sqlsrv/sqlsrv_forge.php
+++ b/system/database/drivers/sqlsrv/sqlsrv_forge.php
@@ -67,6 +67,7 @@ class CI_DB_sqlsrv_forge extends CI_DB_forge {
else
{
$attributes = array_change_key_case($attributes, CASE_UPPER);
+ $attributes['TYPE'] = preg_replace('/(INT)\(\d+\)/i', '$1', $attributes['TYPE']);
$sql .= "\n\t".$this->db->escape_identifiers($field).' '.$attributes['TYPE'];