<?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 Version20190606144933 extends AbstractMigration
{
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 vsabo ADD aboname_short VARCHAR(8) DEFAULT NULL, ADD max_length_vs_titel INT DEFAULT NULL, ADD max_length_vs_beschreibung INT DEFAULT NULL');
$this->addSql("UPDATE vsabo SET aboname_short='K', max_length_vs_titel = 50, max_length_vs_beschreibung = 60 WHERE id=1");
$this->addSql("UPDATE vsabo SET aboname_short='SO', max_length_vs_titel = 60, max_length_vs_beschreibung = 120 WHERE id=2");
$this->addSql("UPDATE vsabo SET aboname_short='SM', max_length_vs_titel = 60, max_length_vs_beschreibung = 120 WHERE id=3");
$this->addSql("UPDATE vsabo SET aboname_short='PO', max_length_vs_titel = 100, max_length_vs_beschreibung = 300 WHERE id=4");
$this->addSql("UPDATE vsabo SET aboname_short='PM', max_length_vs_titel = 100, max_length_vs_beschreibung = 300 WHERE id=5");
}
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 vsabo DROP aboname_short, DROP max_length_vs_titel, DROP max_length_vs_beschreibung');
}
}