From 1b2c0ecc870917ccea320ec543f5df20adc009e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Mon, 6 Mar 2023 13:01:10 +0100 Subject: [PATCH] fixed: use TEXT instead of VARCHAR to store profession --- src/Bundle/ChillThirdPartyBundle/Entity/ThirdParty.php | 2 +- .../migrations/Version20230215175150.php | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/Bundle/ChillThirdPartyBundle/Entity/ThirdParty.php b/src/Bundle/ChillThirdPartyBundle/Entity/ThirdParty.php index 43f053c77..b13118168 100644 --- a/src/Bundle/ChillThirdPartyBundle/Entity/ThirdParty.php +++ b/src/Bundle/ChillThirdPartyBundle/Entity/ThirdParty.php @@ -250,7 +250,7 @@ class ThirdParty implements TrackCreationInterface, TrackUpdateInterface /** * [fr] Qualité. - * @ORM\Column(name="profession", type="string", length=255, nullable=false) + * @ORM\Column(name="profession", type="text", nullable=false) * @Groups({"read", "write", "docgen:read", "docgen:read:3party:parent"}) * @Context(normalizationContext={"groups": "docgen:read"}, groups={"docgen:read:3party:parent"}) */ diff --git a/src/Bundle/ChillThirdPartyBundle/migrations/Version20230215175150.php b/src/Bundle/ChillThirdPartyBundle/migrations/Version20230215175150.php index 321922a7e..223c9aeae 100644 --- a/src/Bundle/ChillThirdPartyBundle/migrations/Version20230215175150.php +++ b/src/Bundle/ChillThirdPartyBundle/migrations/Version20230215175150.php @@ -43,7 +43,7 @@ final class Version20230215175150 extends AbstractMigration implements Container public function up(Schema $schema): void { - $this->addSql('ALTER TABLE chill_3party.third_party ADD profession VARCHAR(255) DEFAULT \'\' NOT NULL'); + $this->addSql('ALTER TABLE chill_3party.third_party ADD profession TEXT DEFAULT \'\' NOT NULL'); $em = $this->container->get('doctrine.orm.entity_manager'); $professions = $em->getRepository(ThirdPartyProfession::class)->findAll(); @@ -59,7 +59,5 @@ final class Version20230215175150 extends AbstractMigration implements Container ['profession' => Types::STRING, 'id' => Types::INTEGER] ); } - -// $this->addSql('ALTER TABLE chill_3party.third_party DROP profession_id'); } }