diff --git a/src/Platforms/SQLServerPlatform.php b/src/Platforms/SQLServerPlatform.php index a4e81c6e5e4..32bff6fbae2 100644 --- a/src/Platforms/SQLServerPlatform.php +++ b/src/Platforms/SQLServerPlatform.php @@ -1559,12 +1559,14 @@ protected function initializeDoctrineTypeMappings() 'smalldatetime' => Types::DATETIME_MUTABLE, 'smallint' => Types::SMALLINT, 'smallmoney' => Types::INTEGER, + 'sysname' => Types::STRING, 'text' => Types::TEXT, 'time' => Types::TIME_MUTABLE, 'tinyint' => Types::SMALLINT, 'uniqueidentifier' => Types::GUID, 'varbinary' => Types::BINARY, 'varchar' => Types::STRING, + 'xml' => Types::TEXT, ]; } diff --git a/tests/Platforms/SQLServerPlatformTest.php b/tests/Platforms/SQLServerPlatformTest.php index 4cb48bc59ab..d3cc6edf4df 100644 --- a/tests/Platforms/SQLServerPlatformTest.php +++ b/tests/Platforms/SQLServerPlatformTest.php @@ -1145,6 +1145,12 @@ public function testInitializesDoctrineTypeMappings(): void self::assertTrue($this->platform->hasDoctrineTypeMappingFor('uniqueidentifier')); self::assertSame(Types::GUID, $this->platform->getDoctrineTypeMapping('uniqueidentifier')); + + self::assertTrue($this->platform->hasDoctrineTypeMappingFor('sysname')); + self::assertSame(Types::STRING, $this->platform->getDoctrineTypeMapping('sysname')); + + self::assertTrue($this->platform->hasDoctrineTypeMappingFor('xml')); + self::assertSame(Types::TEXT, $this->platform->getDoctrineTypeMapping('xml')); } protected function getBinaryMaxLength(): int