<?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 Version20190515131922 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_values DROP FOREIGN KEY FK_5C73E607B6E62EFA');
$this->addSql('DROP INDEX fk_std_attributes_values_std_attributes ON std_attributes_values');
$this->addSql('ALTER TABLE std_attributes_values ADD attribute_machine_name VARCHAR(50) NOT NULL COMMENT \'Attribute machine name\', DROP attribute_id');
}
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_values DROP FOREIGN KEY FK_5C73E6078EC79B58');
$this->addSql('DROP INDEX IDX_5C73E6078EC79B58 ON std_attributes_values');
$this->addSql('ALTER TABLE std_attributes_values ADD attribute_id INT UNSIGNED DEFAULT NULL COMMENT \'Attribute unique identifier\', DROP attribute_machine_name');
}
}