for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Surfnet\StepupMiddleware\Migrations;
use Doctrine\DBAL\Migrations\AbstractMigration;
use Doctrine\DBAL\Schema\Schema;
/**
* Auto-generated Migration: Please modify to your needs!
*/
class Version20141117230116 extends AbstractMigration
{
public function up(Schema $schema)
// this up() migration is auto-generated, please modify it to your needs
$this->abortIf($this->connection->getDatabasePlatform()->getName() != 'mysql', 'Migration can only be executed safely on \'mysql\'.');
$this->addSql('ALTER TABLE identity ADD institution VARCHAR(255) NOT NULL, ADD email VARCHAR(255) NOT NULL');
$this->addSql('CREATE INDEX idx_identity_institution ON identity (institution)');
$this->addSql('CREATE FULLTEXT INDEX idxft_identity_email ON identity (email)');
}
public function down(Schema $schema)
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('DROP INDEX idxft_identity_email ON identity');
$this->addSql('DROP INDEX idx_identity_institution ON identity');
$this->addSql('ALTER TABLE identity DROP institution, DROP email');