mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-06-01 20:33:33 +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
lib/Cake/Test/Case/Model/Datasource/Database
|
@ -449,6 +449,15 @@ class SqlserverTest extends CakeTestCase {
|
|||
'Null' => 'YES',
|
||||
'Size' => '0',
|
||||
),
|
||||
(object)array(
|
||||
'Default' => null,
|
||||
'Field' => 'description',
|
||||
'Key' => '0',
|
||||
'Type' => 'text',
|
||||
'Length' => 16,
|
||||
'Null' => 'YES',
|
||||
'Size' => '0',
|
||||
),
|
||||
));
|
||||
$this->db->executeResultsStack = array($SqlserverTableDescription);
|
||||
$dummyModel = $this->model;
|
||||
|
@ -485,6 +494,12 @@ class SqlserverTest extends CakeTestCase {
|
|||
'default' => null,
|
||||
'length' => 8,
|
||||
),
|
||||
'description' => array(
|
||||
'type' => 'text',
|
||||
'null' => true,
|
||||
'default' => null,
|
||||
'length' => null,
|
||||
)
|
||||
);
|
||||
$this->assertEquals($expected, $result);
|
||||
$this->assertSame($expected['parent_id'], $result['parent_id']);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue