From ba41ab98f7f4982e5c49c322ef5c3112e089114e Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Wed, 6 Sep 2023 15:50:45 +0200 Subject: [PATCH] FEATURE [isActive][center] add isActive property to the center entity --- src/Bundle/ChillMainBundle/Entity/Center.php | 5 ++++ .../migrations/Version20230906134410.php | 29 +++++++++++++++++++ 2 files changed, 34 insertions(+) create mode 100644 src/Bundle/ChillMainBundle/migrations/Version20230906134410.php diff --git a/src/Bundle/ChillMainBundle/Entity/Center.php b/src/Bundle/ChillMainBundle/Entity/Center.php index 0d5402409..23bd2812d 100644 --- a/src/Bundle/ChillMainBundle/Entity/Center.php +++ b/src/Bundle/ChillMainBundle/Entity/Center.php @@ -48,6 +48,11 @@ class Center implements HasCenterInterface */ private string $name = ''; + /** + * @ORM\Column(type="boolean") + */ + private bool $isActive = true; + /** * @var Collection * @ORM\ManyToMany(targetEntity=Regroupment::class, mappedBy="centers") diff --git a/src/Bundle/ChillMainBundle/migrations/Version20230906134410.php b/src/Bundle/ChillMainBundle/migrations/Version20230906134410.php new file mode 100644 index 000000000..231dffb23 --- /dev/null +++ b/src/Bundle/ChillMainBundle/migrations/Version20230906134410.php @@ -0,0 +1,29 @@ +addSql('ALTER TABLE centers ADD isActive BOOLEAN NOT NULL'); + } + + public function down(Schema $schema): void + { + $this->addSql('ALTER TABLE centers DROP isActive'); + } +}