Skip to content

Commit ebd4aa4

Browse files
authored
Merge pull request #6017 from pmattmann/feature/fix-checklist-migration
fix Checklist.IsPrototype migration
2 parents 6fae7ea + e74629b commit ebd4aa4

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

api/migrations/schema/Version20240912183023.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ public function getDescription(): string {
1717

1818
public function up(Schema $schema): void {
1919
// this up() migration is auto-generated, please modify it to your needs
20-
$this->addSql('ALTER TABLE checklist ADD isPrototype BOOLEAN NOT NULL');
20+
$this->addSql('ALTER TABLE checklist ADD isPrototype BOOLEAN NOT NULL DEFAULT FALSE');
2121
$this->addSql('ALTER TABLE checklist ALTER campid DROP NOT NULL');
2222
}
2323

api/src/Entity/Checklist.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ class Checklist extends BaseEntity implements BelongsToCampInterface, CopyFromPr
119119
#[Assert\DisableAutoMapping]
120120
#[ApiProperty(example: true, writable: true)]
121121
#[Groups(['read', 'create'])]
122-
#[ORM\Column(type: 'boolean')]
122+
#[ORM\Column(type: 'boolean', options: ['default' => false])]
123123
public bool $isPrototype = false;
124124

125125
public function __construct() {

0 commit comments

Comments
 (0)