From 901ae47ce6062754bc2d94b43e5dfacd25c6e6bd Mon Sep 17 00:00:00 2001 From: nobohan Date: Thu, 17 Jun 2021 11:12:40 +0200 Subject: [PATCH] person: correct migration + entity --- src/Bundle/ChillPersonBundle/Entity/Person.php | 2 +- .../ChillPersonBundle/migrations/Version20210617073504.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Bundle/ChillPersonBundle/Entity/Person.php b/src/Bundle/ChillPersonBundle/Entity/Person.php index f44cb1c30..f812739c4 100644 --- a/src/Bundle/ChillPersonBundle/Entity/Person.php +++ b/src/Bundle/ChillPersonBundle/Entity/Person.php @@ -293,7 +293,7 @@ class Person implements HasCenterInterface * Number of children * @var int * - * @ORM\Column(type="integer", options={"default" : 0}) + * @ORM\Column(type="integer", nullable=true) */ private $numberOfChildren; diff --git a/src/Bundle/ChillPersonBundle/migrations/Version20210617073504.php b/src/Bundle/ChillPersonBundle/migrations/Version20210617073504.php index 3a936e287..f9e96697d 100644 --- a/src/Bundle/ChillPersonBundle/migrations/Version20210617073504.php +++ b/src/Bundle/ChillPersonBundle/migrations/Version20210617073504.php @@ -23,7 +23,7 @@ final class Version20210617073504 extends AbstractMigration $this->addSql('ALTER TABLE chill_person_person ADD maritalStatusDate DATE DEFAULT NULL'); $this->addSql('ALTER TABLE chill_person_person ADD acceptSMS BOOLEAN DEFAULT false NOT NULL'); $this->addSql('ALTER TABLE chill_person_person ADD acceptEmail BOOLEAN DEFAULT false NOT NULL'); - $this->addSql('ALTER TABLE chill_person_person ADD numberOfChildren INT DEFAULT 0 NOT NULL'); + $this->addSql('ALTER TABLE chill_person_person ADD numberOfChildren INT DEFAULT NULL'); $this->addSql('ALTER TABLE chill_person_person ADD genderComment_comment TEXT DEFAULT NULL'); $this->addSql('ALTER TABLE chill_person_person ADD genderComment_userId INT DEFAULT NULL'); $this->addSql('ALTER TABLE chill_person_person ADD genderComment_date TIMESTAMP(0) WITHOUT TIME ZONE DEFAULT NULL');