<?php
namespace DoctrineMigrations;
use Doctrine\Migrations\AbstractMigration;
use Doctrine\DBAL\Schema\Schema;
/**
* Auto-generated Migration: Please modify to your needs!
*/
class Version20180409054747 extends AbstractMigration
{
/**
* @param Schema $schema
*/
public function up(Schema $schema) : void
{
// 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 rubrik ADD url_slug VARCHAR(255) DEFAULT NULL, ADD is_system_relevant TINYINT(1) NOT NULL');
$this->addSql('CREATE UNIQUE INDEX UNIQ_6E1F895E86C952DA ON rubrik (url_slug)');
}
/**
* @param Schema $schema
*/
public function down(Schema $schema) : void
{
// this down() 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('DROP INDEX UNIQ_6E1F895E86C952DA ON rubrik');
$this->addSql('ALTER TABLE rubrik DROP url_slug, DROP is_system_relevant');
}
}