Skip to content

Commit 8da54de

Browse files
committed
fix MSSQL
1 parent 8714518 commit 8da54de

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/Persistence/Sql/Mssql/PlatformTrait.php

+10
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,22 @@ public function getBlobTypeDeclarationSQL(array $column)
1616
return $this->getClobTypeDeclarationSQL($column);
1717
}
1818

19+
// remove once https://github.com/doctrine/dbal/pull/4987 is fixed
20+
// and also $this->markDoctrineTypeCommented('text') below
21+
public function getClobTypeDeclarationSQL(array $column)
22+
{
23+
$res = parent::getClobTypeDeclarationSQL($column);
24+
25+
return (str_starts_with($res, 'VARCHAR') ? 'N' : '') . $res;
26+
}
27+
1928
protected function initializeCommentedDoctrineTypes()
2029
{
2130
parent::initializeCommentedDoctrineTypes();
2231

2332
$this->markDoctrineTypeCommented('binary');
2433
$this->markDoctrineTypeCommented('blob');
34+
$this->markDoctrineTypeCommented('text');
2535
}
2636

2737
// SQL Server DBAL platform has buggy identifier escaping, fix until fixed officially, see:

0 commit comments

Comments
 (0)