From 94b2c3a0a4eabd8d35c91c8caab66752542ee5cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Bundyra?= Date: Wed, 5 Jun 2024 07:43:08 +0100 Subject: [PATCH] fix schema comparator --- src/Schema/SQLServerSchemaManager.php | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/src/Schema/SQLServerSchemaManager.php b/src/Schema/SQLServerSchemaManager.php index e0a74ce2a81..3fe9f19c944 100644 --- a/src/Schema/SQLServerSchemaManager.php +++ b/src/Schema/SQLServerSchemaManager.php @@ -89,7 +89,9 @@ protected function _getPortableTableColumnDefinition(array $tableColumn): Column break; case 'nvarchar': + // TEXT type is returned as VARCHAR(MAX) with a length of -1 if ($length === -1) { + $dbType = 'text'; break; } @@ -97,14 +99,6 @@ protected function _getPortableTableColumnDefinition(array $tableColumn): Column $length /= 2; break; - case 'varchar': - // TEXT type is returned as VARCHAR(MAX) with a length of -1 - if ($length === -1) { - $dbType = 'text'; - } - - break; - case 'varbinary': if ($length === -1) { $dbType = 'blob';