Skip to content

Commit 6d4b00d

Browse files
authored
Filter out null fixed option from generated migrations (#1048)
When generating migrations, the 'fixed' option could be set to null for binary columns, which causes an error when running the migration because Column::setFixed() expects a bool, not null. Fixes #1046
1 parent 612764c commit 6d4b00d

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

src/View/Helper/MigrationHelper.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -401,6 +401,10 @@ public function getColumnOption(array $options): array
401401
if (empty($columnOptions['collate'])) {
402402
unset($columnOptions['collate']);
403403
}
404+
// isset() returns false for null values, so this handles both missing and null cases
405+
if (!isset($columnOptions['fixed'])) {
406+
unset($columnOptions['fixed']);
407+
}
404408

405409
// currently only MySQL supports the signed option
406410
$driver = $connection->getDriver();

0 commit comments

Comments
 (0)