diff --git a/app/DoctrineMigrations/Version20151001210600.php b/app/DoctrineMigrations/Version20151001210600.php new file mode 100644 index 0000000..db59780 --- /dev/null +++ b/app/DoctrineMigrations/Version20151001210600.php @@ -0,0 +1,34 @@ +abortIf($this->connection->getDatabasePlatform()->getName() != 'postgresql', 'Migration can only be executed safely on \'postgresql\'.'); + + $this->addSql('DROP INDEX uniq_338adfc4aa08cb10'); + } + + /** + * @param Schema $schema + */ + public function down(Schema $schema) + { + // this down() migration is auto-generated, please modify it to your needs + $this->abortIf($this->connection->getDatabasePlatform()->getName() != 'postgresql', 'Migration can only be executed safely on \'postgresql\'.'); + + $this->addSql('CREATE UNIQUE INDEX uniq_338adfc4aa08cb10 ON users.users (login)'); + } +} diff --git a/src/Skobkin/Bundle/PointToolsBundle/Entity/User.php b/src/Skobkin/Bundle/PointToolsBundle/Entity/User.php index 35ee886..f327ea1 100644 --- a/src/Skobkin/Bundle/PointToolsBundle/Entity/User.php +++ b/src/Skobkin/Bundle/PointToolsBundle/Entity/User.php @@ -25,7 +25,7 @@ class User /** * @var string * - * @ORM\Column(name="login", type="string", length=255, nullable=false, unique=true) + * @ORM\Column(name="login", type="string", length=255, nullable=false) */ private $login;