Temporary #21 bugfix.
This commit is contained in:
parent
f351fc22ff
commit
f7bbe3ebed
34
app/DoctrineMigrations/Version20151001210600.php
Normal file
34
app/DoctrineMigrations/Version20151001210600.php
Normal 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)');
|
||||
}
|
||||
}
|
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in a new issue