File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -96,7 +96,7 @@ public function getName()
9696 protected $ titlesAfterName ;
9797
9898 /**
99- * @ORM\Column(type="string")
99+ * @ORM\Column(type="string", unique=true )
100100 */
101101 protected $ email ;
102102
Original file line number Diff line number Diff line change 1+ <?php
2+
3+ declare (strict_types=1 );
4+
5+ namespace Migrations ;
6+
7+ use Doctrine \DBAL \Schema \Schema ;
8+ use Doctrine \Migrations \AbstractMigration ;
9+
10+ /**
11+ * Auto-generated Migration: Please modify to your needs!
12+ */
13+ final class Version20250220202930 extends AbstractMigration
14+ {
15+ public function getDescription (): string
16+ {
17+ return '' ;
18+ }
19+
20+ public function up (Schema $ schema ): void
21+ {
22+ // this up() migration is auto-generated, please modify it to your needs
23+ $ this ->addSql ('CREATE UNIQUE INDEX UNIQ_8D93D649E7927C74 ON user (email) ' );
24+ }
25+
26+ public function down (Schema $ schema ): void
27+ {
28+ // this down() migration is auto-generated, please modify it to your needs
29+ $ this ->addSql ('DROP INDEX UNIQ_8D93D649E7927C74 ON user ' );
30+ }
31+ }
You can’t perform that action at this time.
0 commit comments