diff options
author | Andrey Andreev <narf@bofh.bg> | 2012-06-07 15:13:54 +0200 |
---|---|---|
committer | Andrey Andreev <narf@bofh.bg> | 2012-06-07 15:13:54 +0200 |
commit | 1f26edc61f314a74cd93fcdf688b3780734e0e96 (patch) | |
tree | 2dbc6871e50efea84e94e83a268094a1615c147c /system/database/drivers/mssql/mssql_forge.php | |
parent | 596c51cdca8d623c96243a81bc5212d34f820a97 (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.php | 1 |
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']; |