Skip to content

Commit

Permalink
fix schema comparator
Browse files Browse the repository at this point in the history
  • Loading branch information
michalbundyra committed Jun 5, 2024
1 parent 4e1a26a commit 94b2c3a
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions src/Schema/SQLServerSchemaManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -89,22 +89,16 @@ 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;
}

// Unicode data requires 2 bytes per character
$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';
Expand Down

0 comments on commit 94b2c3a

Please sign in to comment.