<?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 Version20221128140840 extends AbstractMigration
{
public function getDescription(): string
{
return '';
}
public function up(Schema $schema): void
{
$this->addSql("
UPDATE public.property
SET reference_property_status_id = (SELECT id FROM public.reference_property_status WHERE code = '-2')
WHERE reference_property_status_id = (SELECT id FROM public.reference_property_status WHERE code = '-10')
");
$this->addSql("DELETE FROM public.reference_property_status WHERE code = '-10'");
}
public function down(Schema $schema): void
{
$this->addSql("INSERT INTO public.reference_property_status
VALUES (nextval('\"public\".reference_property_status_id_seq'::regclass), 'reference.property.status.VALID', '-10')");
}
}