<?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 Version20181217170223 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 customer_status ADD type ENUM(\'default\', \'converted\', \'closed\', \'in_collections\', \'stop_work\', \'cancelled\', \'inactive\', \'waiting_on_poa\', \'pending\') DEFAULT NULL COMMENT \'(DC2Type:StatusType)\'');
$this->addSql('UPDATE customer_status SET type = \'default\' WHERE id = 1');
$this->addSql('UPDATE customer_status SET type = \'converted\' WHERE id = 2');
$this->addSql('UPDATE customer_status SET type = \'closed\' WHERE id = 5');
$this->addSql('UPDATE customer_status SET type = \'in_collections\' WHERE id = 6');
$this->addSql('UPDATE customer_status SET type = \'stop_work\' WHERE id = 7');
$this->addSql('UPDATE customer_status SET type = \'cancelled\' WHERE id = 8');
$this->addSql('UPDATE customer_status SET type = \'inactive\' WHERE id = 9');
$this->addSql('UPDATE customer_status SET type = \'waiting_on_poa\' WHERE id = 10');
$this->addSql('UPDATE customer_status SET type = \'pending\' WHERE id = 11');
}
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 customer_status DROP type');
}
}