<?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 Version20230619081617 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('CREATE TABLE deal_contrat (deal_id INT NOT NULL, contrat_id INT NOT NULL, INDEX IDX_842E111BF60E2305 (deal_id), INDEX IDX_842E111B1823061F (contrat_id), PRIMARY KEY(deal_id, contrat_id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('ALTER TABLE deal_contrat ADD CONSTRAINT FK_842E111BF60E2305 FOREIGN KEY (deal_id) REFERENCES deal (id) ON DELETE CASCADE');
$this->addSql('ALTER TABLE deal_contrat ADD CONSTRAINT FK_842E111B1823061F FOREIGN KEY (contrat_id) REFERENCES contrat (id) ON DELETE CASCADE');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('DROP TABLE deal_contrat');
}
}