<?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 Version20220409213143 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 dossier_retraite (id INT AUTO_INCREMENT NOT NULL, courtier_id INT DEFAULT NULL, souscripteur_id INT DEFAULT NULL, contrat_id INT DEFAULT NULL, garantie_id INT DEFAULT NULL, etat INT NOT NULL, created_at DATETIME NOT NULL, updated_at DATETIME DEFAULT NULL, INDEX IDX_DB2F7D25E82428FD (courtier_id), INDEX IDX_DB2F7D25A0B466D6 (souscripteur_id), INDEX IDX_DB2F7D251823061F (contrat_id), INDEX IDX_DB2F7D25A4B9602F (garantie_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('ALTER TABLE dossier_retraite ADD CONSTRAINT FK_DB2F7D25E82428FD FOREIGN KEY (courtier_id) REFERENCES courtier (id)');
$this->addSql('ALTER TABLE dossier_retraite ADD CONSTRAINT FK_DB2F7D25A0B466D6 FOREIGN KEY (souscripteur_id) REFERENCES souscripteur (id)');
$this->addSql('ALTER TABLE dossier_retraite ADD CONSTRAINT FK_DB2F7D251823061F FOREIGN KEY (contrat_id) REFERENCES contrat (id)');
$this->addSql('ALTER TABLE dossier_retraite ADD CONSTRAINT FK_DB2F7D25A4B9602F FOREIGN KEY (garantie_id) REFERENCES garanties (id)');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('DROP TABLE dossier_retraite');
}
}