diff --git a/src/Bundle/ChillThirdPartyBundle/Entity/ThirdParty.php b/src/Bundle/ChillThirdPartyBundle/Entity/ThirdParty.php index fff378cdb..d7efce10c 100644 --- a/src/Bundle/ChillThirdPartyBundle/Entity/ThirdParty.php +++ b/src/Bundle/ChillThirdPartyBundle/Entity/ThirdParty.php @@ -198,10 +198,10 @@ class ThirdParty implements TrackCreationInterface, TrackUpdateInterface private ?string $email = null; /** - * @ORM\Column(name="firstname", type="string", length=255, nullable=true) + * @ORM\Column(name="firstname", type="text", options={"default":""}) * @Groups({"read", "write", "docgen:read", "docgen:read:3party:parent"}) */ - private ?string $firstname = null; + private string $firstname = ''; /** * @var int @@ -460,7 +460,7 @@ class ThirdParty implements TrackCreationInterface, TrackUpdateInterface return $this->email; } - public function getFirstname(): ?string + public function getFirstname(): string { return $this->firstname; } @@ -767,7 +767,7 @@ class ThirdParty implements TrackCreationInterface, TrackUpdateInterface return $this; } - public function setFirstname($firstname): self + public function setFirstname(string $firstname): self { $this->firstname = $firstname; diff --git a/src/Bundle/ChillThirdPartyBundle/migrations/Version20220322095659.php b/src/Bundle/ChillThirdPartyBundle/migrations/Version20220322095659.php index 454785037..140539d1e 100644 --- a/src/Bundle/ChillThirdPartyBundle/migrations/Version20220322095659.php +++ b/src/Bundle/ChillThirdPartyBundle/migrations/Version20220322095659.php @@ -33,6 +33,6 @@ final class Version20220322095659 extends AbstractMigration public function up(Schema $schema): void { // this up() migration is auto-generated, please modify it to your needs - $this->addSql('ALTER TABLE chill_3party.third_party ADD firstname VARCHAR(255) DEFAULT NULL'); + $this->addSql('ALTER TABLE chill_3party.third_party ADD firstname TEXT DEFAULT \'\''); } }