<?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 Version20221128164526 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 property_visit_voucher DROP CONSTRAINT fk_57634dbf78eab0e7');
$this->addSql('ALTER TABLE property_visit_voucher DROP CONSTRAINT fk_57634dbf6c51c821');
$this->addSql('DROP INDEX idx_57634dbf78eab0e7');
$this->addSql('DROP INDEX idx_57634dbf6c51c821');
$this->addSql('ALTER TABLE property_visit_voucher DROP reference_property_contract_type_id');
$this->addSql('ALTER TABLE property_visit_voucher DROP reference_property_land_type_id');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('CREATE SCHEMA public');
$this->addSql('ALTER TABLE property_visit_voucher ADD reference_property_contract_type_id INT DEFAULT NULL');
$this->addSql('ALTER TABLE property_visit_voucher ADD reference_property_land_type_id INT DEFAULT NULL');
$this->addSql('ALTER TABLE property_visit_voucher ADD CONSTRAINT fk_57634dbf78eab0e7 FOREIGN KEY (reference_property_contract_type_id) REFERENCES reference_property_contract_type (id) NOT DEFERRABLE INITIALLY IMMEDIATE');
$this->addSql('ALTER TABLE property_visit_voucher ADD CONSTRAINT fk_57634dbf6c51c821 FOREIGN KEY (reference_property_land_type_id) REFERENCES reference_property_land_type (id) NOT DEFERRABLE INITIALLY IMMEDIATE');
$this->addSql('CREATE INDEX idx_57634dbf78eab0e7 ON property_visit_voucher (reference_property_contract_type_id)');
$this->addSql('CREATE INDEX idx_57634dbf6c51c821 ON property_visit_voucher (reference_property_land_type_id)');
}
}