diff --git a/src/Bundle/ChillPersonBundle/Entity/Person.php b/src/Bundle/ChillPersonBundle/Entity/Person.php index 35db2ef83..5bfe3bd10 100644 --- a/src/Bundle/ChillPersonBundle/Entity/Person.php +++ b/src/Bundle/ChillPersonBundle/Entity/Person.php @@ -254,7 +254,6 @@ class Person implements HasCenterInterface, TrackCreationInterface, TrackUpdateI * @var Center * * @ORM\ManyToOne(targetEntity="Chill\MainBundle\Entity\Center") - * @ORM\JoinColumn(nullable=false) */ private $center; diff --git a/src/Bundle/ChillPersonBundle/migrations/Version20210831140339.php b/src/Bundle/ChillPersonBundle/migrations/Version20210831140339.php new file mode 100644 index 000000000..dd3a60d75 --- /dev/null +++ b/src/Bundle/ChillPersonBundle/migrations/Version20210831140339.php @@ -0,0 +1,29 @@ +addSql('ALTER TABLE chill_person_person ALTER center_id DROP NOT NULL'); + } + + public function down(Schema $schema): void + { + $this->addSql('ALTER TABLE chill_person_person ALTER center_id SET NOT NULL'); + } +}