<?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 Version20221004115900 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->addSql('ALTER TABLE veterinary_clinic DROP COLUMN dc_ext_sys_id');
# $this->addSql('ALTER TABLE publisher ADD COLUMN vp_ext_sys_id VARCHAR(255) DEFAULT NULL');
$this->addSql('UPDATE publisher SET vp_ext_sys_id = lower(vp_name)');
$this->addSql('ALTER TABLE publisher MODIFY vp_ext_sys_id VARCHAR(255) NOT NULL');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE veterinary_clinic ADD COLUMN dc_ext_sys_id VARCHAR(255) DEFAULT NULL');
$this->addSql('ALTER TABLE publisher DROP COLUMN vp_ext_sys_id');
}
}