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');