From df1f44d81453f1a60b3a46d9fa32f5264ec9fe7b Mon Sep 17 00:00:00 2001 From: Pol Dellaiera Date: Wed, 23 Jun 2021 16:40:04 +0200 Subject: [PATCH] Let SocialAction::defaultNotificationDelay be nullable. --- .../Entity/SocialWork/SocialAction.php | 2 +- .../migrations/Version20210623142046.php | 29 +++++++++++++++++++ 2 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 src/Bundle/ChillPersonBundle/migrations/Version20210623142046.php diff --git a/src/Bundle/ChillPersonBundle/Entity/SocialWork/SocialAction.php b/src/Bundle/ChillPersonBundle/Entity/SocialWork/SocialAction.php index 35abe392f..506a736d8 100644 --- a/src/Bundle/ChillPersonBundle/Entity/SocialWork/SocialAction.php +++ b/src/Bundle/ChillPersonBundle/Entity/SocialWork/SocialAction.php @@ -47,7 +47,7 @@ class SocialAction private $children; /** - * @ORM\Column(type="dateinterval") + * @ORM\Column(type="dateinterval", nullable=true) */ private $defaultNotificationDelay; diff --git a/src/Bundle/ChillPersonBundle/migrations/Version20210623142046.php b/src/Bundle/ChillPersonBundle/migrations/Version20210623142046.php new file mode 100644 index 000000000..8baffb867 --- /dev/null +++ b/src/Bundle/ChillPersonBundle/migrations/Version20210623142046.php @@ -0,0 +1,29 @@ +addSql('ALTER TABLE chill_person_social_action ALTER defaultnotificationdelay DROP NOT NULL'); + } + + public function down(Schema $schema): void + { + $this->addSql('ALTER TABLE chill_person_social_action ALTER defaultNotificationDelay SET NOT NULL'); + } +}