<?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 Version20220614191156 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 insured_insurer ADD approved_limit DOUBLE PRECISION DEFAULT NULL, ADD used_limit DOUBLE PRECISION DEFAULT NULL, ADD available_limit DOUBLE PRECISION DEFAULT NULL');
$this->addSql('ALTER TABLE policy_insurer DROP FOREIGN KEY FK_C1F7F92B2D29E3C6');
$this->addSql('ALTER TABLE policy_insurer ADD CONSTRAINT FK_C1F7F92B2D29E3C6 FOREIGN KEY (policy_id) REFERENCES policy (id) ON DELETE CASCADE');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE insured_insurer DROP approved_limit, DROP used_limit, DROP available_limit');
$this->addSql('ALTER TABLE policy_insurer DROP FOREIGN KEY FK_C1F7F92B2D29E3C6');
$this->addSql('ALTER TABLE policy_insurer ADD CONSTRAINT FK_C1F7F92B2D29E3C6 FOREIGN KEY (policy_id) REFERENCES policy (id)');
}
}