Skip to content

Commit 28128ac

Browse files
committed
fix: update boolean column comparison to exclude unknown size from checks
1 parent e03bc4e commit 28128ac

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

src/Driver/MySQL/Schema/MySQLColumn.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ class MySQLColumn extends AbstractColumn
4242
*/
4343
public const DATETIME_NOW = 'CURRENT_TIMESTAMP';
4444

45-
public const EXCLUDE_FROM_COMPARE = ['size', 'timezone', 'userType', 'attributes', 'first', 'after'];
45+
public const EXCLUDE_FROM_COMPARE = ['size', 'timezone', 'userType', 'attributes', 'first', 'after', 'unknownSize'];
4646
protected const INTEGER_TYPES = ['tinyint', 'smallint', 'mediumint', 'int', 'bigint'];
4747

4848
protected array $mapping = [

tests/Database/Functional/Driver/MySQL/Schema/BooleanColumnTest.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,5 +86,7 @@ public function testBooleanWithProblematicValues(): void
8686
$this->assertSame('0', $defaultValue);
8787
$this->assertTrue($column->compare($target));
8888
$this->assertTrue($target->compare($column));
89+
// The size was not changed
90+
$this->assertSame(4, $target->getSize());
8991
}
9092
}

0 commit comments

Comments
 (0)