Temporary #21 bugfix.

This commit is contained in:
Alexey Skobkin 2015-10-01 21:15:49 +03:00
parent f351fc22ff
commit f7bbe3ebed
2 changed files with 35 additions and 1 deletions

View File

@ -0,0 +1,34 @@
<?php
namespace Application\Migrations;
use Doctrine\DBAL\Migrations\AbstractMigration;
use Doctrine\DBAL\Schema\Schema;
/**
* Deletes user login unique index. Temporary fix for user renaming.
*/
class Version20151001210600 extends AbstractMigration
{
/**
* @param Schema $schema
*/
public function up(Schema $schema)
{
// this up() 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('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)');
}
}

View File

@ -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;