<?php
declare(strict_types=1);
namespace DoctrineMigrations;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;
/**
* Auto-generated Migration: Please modify to your needs!
*/
final class Version20190513112716 extends AbstractMigration
{
public function getDescription() : string
{
return '';
}
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 std_attributes DROP FOREIGN KEY FK_2FFB71D841BCBAEC');
$this->addSql('DROP INDEX fk_std_attributes_std_content_types ON std_attributes');
$this->addSql('ALTER TABLE std_attributes DROP content_type');
}
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('ALTER TABLE std_attributes ADD content_type INT UNSIGNED DEFAULT NULL COMMENT \'Unique identifier\'');
$this->addSql('ALTER TABLE std_attributes ADD CONSTRAINT FK_2FFB71D841BCBAEC FOREIGN KEY (content_type) REFERENCES std_content_types (id)');
$this->addSql('CREATE INDEX fk_std_attributes_std_content_types ON std_attributes (content_type)');
}
}