From ecb3c881944cd9e5e786e13a4fc45f079c187a15 Mon Sep 17 00:00:00 2001 From: Vitor Mattos <1079143+vitormattos@users.noreply.github.com> Date: Fri, 3 Apr 2026 22:31:43 -0300 Subject: [PATCH 1/2] fix(migration): allow false values in active column Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com> --- lib/Migration/Version1000Date20260309120000.php | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/Migration/Version1000Date20260309120000.php b/lib/Migration/Version1000Date20260309120000.php index c01ee42..25791a7 100644 --- a/lib/Migration/Version1000Date20260309120000.php +++ b/lib/Migration/Version1000Date20260309120000.php @@ -54,6 +54,7 @@ public function changeSchema(IOutput $output, Closure $schemaClosure, array $opt 'unsigned' => true, ]); $table->addColumn('active', Types::BOOLEAN, [ + 'notnull' => false, 'default' => true, ]); $table->addColumn('options', Types::TEXT, [ From feddf4838c3aff7ccaab0a22e25d11f3c42bc760 Mon Sep 17 00:00:00 2001 From: Vitor Mattos <1079143+vitormattos@users.noreply.github.com> Date: Fri, 3 Apr 2026 22:40:12 -0300 Subject: [PATCH 2/2] fix(migration): add upgrade step for active column nullability Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com> --- .../Version1001Date20260404010000.php | 49 +++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 lib/Migration/Version1001Date20260404010000.php diff --git a/lib/Migration/Version1001Date20260404010000.php b/lib/Migration/Version1001Date20260404010000.php new file mode 100644 index 0000000..fb219a1 --- /dev/null +++ b/lib/Migration/Version1001Date20260404010000.php @@ -0,0 +1,49 @@ +hasTable('profile_fields_definitions')) { + return null; + } + + $table = $schema->getTable('profile_fields_definitions'); + if (!$table->hasColumn('active')) { + return null; + } + + $activeColumn = $table->getColumn('active'); + if (!$activeColumn->getNotnull()) { + return null; + } + + $table->changeColumn('active', [ + 'notnull' => false, + 'default' => true, + ]); + + return $schema; + } +}