diff --git a/src/Bundle/ChillMainBundle/Entity/User.php b/src/Bundle/ChillMainBundle/Entity/User.php index 140e0889c..41d6db40c 100644 --- a/src/Bundle/ChillMainBundle/Entity/User.php +++ b/src/Bundle/ChillMainBundle/Entity/User.php @@ -44,7 +44,8 @@ class User implements AdvancedUserInterface { * @ORM\Column( * type="string", * length=80, - * unique=true) + * unique=true, + * nullable=true) */ private $usernameCanonical; diff --git a/src/Bundle/ChillMainBundle/migrations/Version20210903144853.php b/src/Bundle/ChillMainBundle/migrations/Version20210903144853.php index 4e252c3a3..7fe6b8e72 100644 --- a/src/Bundle/ChillMainBundle/migrations/Version20210903144853.php +++ b/src/Bundle/ChillMainBundle/migrations/Version20210903144853.php @@ -28,7 +28,6 @@ final class Version20210903144853 extends AbstractMigration $this->addSql('ALTER TABLE users ADD mainCenter_id INT DEFAULT NULL'); $this->addSql('ALTER TABLE users ADD mainScope_id INT DEFAULT NULL'); $this->addSql('ALTER TABLE users ADD userJob_id INT DEFAULT NULL'); - $this->addSql('ALTER TABLE users ALTER usernamecanonical SET NOT NULL'); $this->addSql('ALTER TABLE users ADD CONSTRAINT FK_1483A5E92C2125C1 FOREIGN KEY (mainCenter_id) REFERENCES centers (id) NOT DEFERRABLE INITIALLY IMMEDIATE'); $this->addSql('ALTER TABLE users ADD CONSTRAINT FK_1483A5E9115E73F3 FOREIGN KEY (mainScope_id) REFERENCES scopes (id) NOT DEFERRABLE INITIALLY IMMEDIATE'); $this->addSql('ALTER TABLE users ADD CONSTRAINT FK_1483A5E964B65C5B FOREIGN KEY (userJob_id) REFERENCES chill_main_user_job (id) NOT DEFERRABLE INITIALLY IMMEDIATE');