mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-09-05 11:02:40 +00:00
Fix length reflection in SQLServer
Don't reflect TEXT column lengths in SQLServer. Because SQLServer text columns hold ~2GB of data there is no meaningful length to them. Refs #5506
This commit is contained in:
parent
843ddd6d36
commit
ec57fb4579
2 changed files with 18 additions and 0 deletions
|
@ -474,6 +474,9 @@ class Sqlserver extends DboSource {
|
|||
if (in_array($length->Type, array('nchar', 'nvarchar'))) {
|
||||
return floor($length->Length / 2);
|
||||
}
|
||||
if ($length->Type === 'text') {
|
||||
return null;
|
||||
}
|
||||
return $length->Length;
|
||||
}
|
||||
return parent::length($length);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue