diff options
author | Andrey Andreev <narf@bofh.bg> | 2012-06-07 15:22:35 +0200 |
---|---|---|
committer | Andrey Andreev <narf@bofh.bg> | 2012-06-07 15:22:35 +0200 |
commit | af4d55da04b8d8750b59e04e46463d525237b74b (patch) | |
tree | 70a74e4d1e5d4331beb2e87e3415d4f652cb2162 /system/database/drivers/sqlsrv | |
parent | 1f26edc61f314a74cd93fcdf688b3780734e0e96 (diff) |
Fix issue #861 (and previous commit, for that matter)
Diffstat (limited to 'system/database/drivers/sqlsrv')
-rw-r--r-- | system/database/drivers/sqlsrv/sqlsrv_forge.php | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/system/database/drivers/sqlsrv/sqlsrv_forge.php b/system/database/drivers/sqlsrv/sqlsrv_forge.php index bd107476e..d8b5193fa 100644 --- a/system/database/drivers/sqlsrv/sqlsrv_forge.php +++ b/system/database/drivers/sqlsrv/sqlsrv_forge.php @@ -67,11 +67,10 @@ 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']; - if (array_key_exists('CONSTRAINT', $attributes)) + if (stripos($attributes['TYPE'], 'INT') === FALSE && ! empty($attributes['CONSTRAINT'])) { $sql .= '('.$attributes['CONSTRAINT'].')'; } |