summaryrefslogtreecommitdiffstats
path: root/system/database/drivers/mssql/mssql_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/mssql/mssql_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/mssql/mssql_forge.php')
-rw-r--r--system/database/drivers/mssql/mssql_forge.php1
1 files changed, 1 insertions, 0 deletions
diff --git a/system/database/drivers/mssql/mssql_forge.php b/system/database/drivers/mssql/mssql_forge.php
index 3708c2233..5454e37b3 100644
--- a/system/database/drivers/mssql/mssql_forge.php
+++ b/system/database/drivers/mssql/mssql_forge.php
@@ -67,6 +67,7 @@ class CI_DB_mssql_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'];