From ea1c12da6402153a4e40e70ca22211575743a570 Mon Sep 17 00:00:00 2001 From: Pol Dellaiera Date: Thu, 24 Jun 2021 15:24:14 +0200 Subject: [PATCH] (to rebase/fixup later) Fields must be nullable for import to success. --- .../Entity/SocialWork/Evaluation.php | 2 +- .../migrations/Version20210624131722.php | 29 +++++++++++++++++++ .../migrations/Version20210624131723.php | 29 +++++++++++++++++++ 3 files changed, 59 insertions(+), 1 deletion(-) create mode 100644 src/Bundle/ChillPersonBundle/migrations/Version20210624131722.php create mode 100644 src/Bundle/ChillPersonBundle/migrations/Version20210624131723.php diff --git a/src/Bundle/ChillPersonBundle/Entity/SocialWork/Evaluation.php b/src/Bundle/ChillPersonBundle/Entity/SocialWork/Evaluation.php index 5a877e264..e08a6de77 100644 --- a/src/Bundle/ChillPersonBundle/Entity/SocialWork/Evaluation.php +++ b/src/Bundle/ChillPersonBundle/Entity/SocialWork/Evaluation.php @@ -23,7 +23,7 @@ class Evaluation private $title = []; /** - * @ORM\Column(type="dateinterval") + * @ORM\Column(type="dateinterval", nullable=true) */ private $delay; diff --git a/src/Bundle/ChillPersonBundle/migrations/Version20210624131722.php b/src/Bundle/ChillPersonBundle/migrations/Version20210624131722.php new file mode 100644 index 000000000..ebeb33e50 --- /dev/null +++ b/src/Bundle/ChillPersonBundle/migrations/Version20210624131722.php @@ -0,0 +1,29 @@ +addSql('ALTER TABLE chill_person_social_work_evaluation ALTER delay DROP NOT NULL'); + } + + public function down(Schema $schema): void + { + $this->addSql('ALTER TABLE chill_person_social_work_evaluation ALTER delay SET NOT NULL'); + } +} diff --git a/src/Bundle/ChillPersonBundle/migrations/Version20210624131723.php b/src/Bundle/ChillPersonBundle/migrations/Version20210624131723.php new file mode 100644 index 000000000..d36d23733 --- /dev/null +++ b/src/Bundle/ChillPersonBundle/migrations/Version20210624131723.php @@ -0,0 +1,29 @@ +addSql('ALTER TABLE chill_person_social_work_evaluation ALTER notificationdelay DROP NOT NULL'); + } + + public function down(Schema $schema): void + { + $this->addSql('ALTER TABLE chill_person_social_work_evaluation ALTER notificationdelay SET NOT NULL'); + } +}