diff --git a/migrations/Version20221125085936.php b/migrations/Version20221125085936.php new file mode 100644 index 0000000000000000000000000000000000000000..6435e1ee2b8554aad3210728903bdb9eb346a545 --- /dev/null +++ b/migrations/Version20221125085936.php @@ -0,0 +1,31 @@ +<?php + +declare(strict_types=1); + +namespace DoctrineMigrations; + +use Doctrine\DBAL\Schema\Schema; +use Doctrine\Migrations\AbstractMigration; + +/** + * Auto-generated Migration: Please modify to your needs! + */ +final class Version20221125085936 extends AbstractMigration +{ + public function getDescription(): string + { + return ''; + } + + public function up(Schema $schema): void + { + // this up() migration is auto-generated, please modify it to your needs + $this->addSql('ALTER TABLE users ADD name VARCHAR(255) DEFAULT NULL'); + } + + public function down(Schema $schema): void + { + // this down() migration is auto-generated, please modify it to your needs + $this->addSql('ALTER TABLE users DROP name'); + } +} diff --git a/src/Entity/Users.php b/src/Entity/Users.php index 7a7a6a90567921d9b0629982a88a2452d8d56298..9f36f8e636461f85d3b8c70eec70d5365c39ba00 100644 --- a/src/Entity/Users.php +++ b/src/Entity/Users.php @@ -29,6 +29,9 @@ class Users implements UserInterface, PasswordAuthenticatedUserInterface #[ORM\ManyToMany(targetEntity: WebResetter::class, inversedBy: 'users')] private Collection $webResetter; + #[ORM\Column(length: 255, nullable: true)] + private ?string $name = null; + public function __construct() { $this->webResetter = new ArrayCollection(); @@ -116,4 +119,16 @@ class Users implements UserInterface, PasswordAuthenticatedUserInterface return $this; } + + public function getName(): ?string + { + return $this->name; + } + + public function setName(?string $name): self + { + $this->name = $name; + + return $this; + } }