<?php
declare(strict_types=1);
namespace Application\Migrations;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;
/**
* Auto-generated Migration: Please modify to your needs!
*/
final class Version20211104080824 extends AbstractMigration
{
public function up(Schema $schema): void
{
// this up() migration is auto-generated, please modify it to your needs
$this->abortIf('mysql' !== $this->connection->getDatabasePlatform()->getName(), 'Migration can only be executed safely on \'mysql\'.');
$this->addSql('ALTER TABLE substance_category ADD abbreviation VARCHAR(255) NOT NULL');
$this->addSql("UPDATE `substance_category` SET `abbreviation` = 'OtherGO' WHERE `substance_category`.`id` = 1");
$this->addSql("UPDATE `substance_category` SET `abbreviation` = 'TDAE' WHERE `substance_category`.`id` = 2");
$this->addSql("UPDATE `substance_category` SET `abbreviation` = 'VHGO' WHERE `substance_category`.`id` = 3");
$this->addSql("UPDATE `substance_category` SET `abbreviation` = 'SRGO' WHERE `substance_category`.`id` = 4");
$this->addSql("UPDATE `substance_category` SET `abbreviation` = 'Petrolatum' WHERE `substance_category`.`id` = 5");
$this->addSql("UPDATE `substance_category` SET `abbreviation` = 'LBO' WHERE `substance_category`.`id` = 6");
$this->addSql("UPDATE `substance_category` SET `abbreviation` = 'Bitumen' WHERE `substance_category`.`id` = 7");
$this->addSql("UPDATE `substance_category` SET `abbreviation` = 'Slackwax' WHERE `substance_category`.`id` = 8");
$this->addSql("UPDATE `substance_category` SET `abbreviation` = 'Naphtha' WHERE `substance_category`.`id` = 9");
$this->addSql("UPDATE `substance_category` SET `abbreviation` = 'HFO' WHERE `substance_category`.`id` = 10");
$this->addSql("UPDATE `substance_category` SET `abbreviation` = 'Kerosine' WHERE `substance_category`.`id` = 11");
$this->addSql("UPDATE `substance_category` SET `abbreviation` = 'CrackedGO' WHERE `substance_category`.`id` = 12");
$this->addSql("UPDATE `substance_category` SET `abbreviation` = 'Paraffinwax' WHERE `substance_category`.`id` = 14");
$this->addSql("UPDATE `substance_category` SET `abbreviation` = 'UATO' WHERE `substance_category`.`id` = 15");
$this->addSql("UPDATE `substance_category` SET `abbreviation` = 'UDAE' WHERE `substance_category`.`id` = 17");
$this->addSql("UPDATE `substance_category` SET `abbreviation` = 'RAE' WHERE `substance_category`.`id` = 18");
$this->addSql("UPDATE `substance_category` SET `abbreviation` = 'MK1' WHERE `substance_category`.`id` = 19");
$this->addSql("UPDATE `substance_category` SET `abbreviation` = 'Footsoil' WHERE `substance_category`.`id` = 20");
$this->addSql("UPDATE `substance_category` SET `abbreviation` = 'OxiAsph' WHERE `substance_category`.`id` = 21");
$this->addSql("UPDATE `substance_category` SET `abbreviation` = 'Sulfur' WHERE `substance_category`.`id` = 22");
$this->addSql("UPDATE `substance_category` SET `abbreviation` = 'HRBO' WHERE `substance_category`.`id` = 23");
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->abortIf('mysql' !== $this->connection->getDatabasePlatform()->getName(), 'Migration can only be executed safely on \'mysql\'.');
$this->addSql('ALTER TABLE substance_category DROP abbreviation');
}
}