fixed: use TEXT instead of VARCHAR to store profession

This commit is contained in:
Julien Fastré 2023-03-06 13:01:10 +01:00
parent f15017ebd7
commit 1b2c0ecc87
Signed by: julienfastre
GPG Key ID: BDE2190974723FCB
2 changed files with 2 additions and 4 deletions

View File

@ -250,7 +250,7 @@ class ThirdParty implements TrackCreationInterface, TrackUpdateInterface
/** /**
* [fr] Qualité. * [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"}) * @Groups({"read", "write", "docgen:read", "docgen:read:3party:parent"})
* @Context(normalizationContext={"groups": "docgen:read"}, groups={"docgen:read:3party:parent"}) * @Context(normalizationContext={"groups": "docgen:read"}, groups={"docgen:read:3party:parent"})
*/ */

View File

@ -43,7 +43,7 @@ final class Version20230215175150 extends AbstractMigration implements Container
public function up(Schema $schema): void 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'); $em = $this->container->get('doctrine.orm.entity_manager');
$professions = $em->getRepository(ThirdPartyProfession::class)->findAll(); $professions = $em->getRepository(ThirdPartyProfession::class)->findAll();
@ -59,7 +59,5 @@ final class Version20230215175150 extends AbstractMigration implements Container
['profession' => Types::STRING, 'id' => Types::INTEGER] ['profession' => Types::STRING, 'id' => Types::INTEGER]
); );
} }
// $this->addSql('ALTER TABLE chill_3party.third_party DROP profession_id');
} }
} }