<?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 Version20221116092954 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 cal_maintenance_quotation ADD report_id INT DEFAULT NULL');
$this->addSql('ALTER TABLE cal_maintenance_quotation ADD CONSTRAINT FK_7568E6894BD2A4C0 FOREIGN KEY (report_id) REFERENCES cal_maintenance_document (id)');
$this->addSql('CREATE UNIQUE INDEX UNIQ_7568E6894BD2A4C0 ON cal_maintenance_quotation (report_id)');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE cal_maintenance_quotation DROP FOREIGN KEY FK_7568E6894BD2A4C0');
$this->addSql('DROP INDEX UNIQ_7568E6894BD2A4C0 ON cal_maintenance_quotation');
$this->addSql('ALTER TABLE cal_maintenance_quotation DROP report_id');
}
}