<?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 Version20201026143548 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 legal_entity_active_definition ADD steps JSON NOT NULL');
$this->addSql('
UPDATE legal_entity_active_definition SET
ec_id = NULL, petroleum_origin = NULL, ec_description_matches = NULL, from_refinery_stream = NULL,
match_boundary_sips = NULL, uses_listed_in_map = NULL, tonnage_band = NULL, cin = NULL, uscc = NULL,
clp_completed = NULL, sip_completed = NULL, importer = NULL, manufacturer = NULL, lead_registrant = NULL,
include_license = NULL, solvent_use = NULL, uses_advised_against = NULL, steps = "[]"
WHERE 1
');
}
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 legal_entity_active_definition DROP steps');
}
}