<?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 Version20220411202335 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 contrat_retraite (id INT AUTO_INCREMENT NOT NULL, dossier_retraite_id INT DEFAULT NULL, numero_contrat VARCHAR(255) NOT NULL, numero_sous_contrat VARCHAR(255) NOT NULL, date_effet DATETIME NOT NULL, date_radiation_eventuelle DATETIME DEFAULT NULL, type_commission INT NOT NULL, etat INT NOT NULL, created_at DATETIME NOT NULL, updated_at DATETIME DEFAULT NULL, INDEX IDX_4AA0850869877B02 (dossier_retraite_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('CREATE TABLE garanties_retraite (id INT AUTO_INCREMENT NOT NULL, dossier_retraite_id INT DEFAULT NULL, produit INT NOT NULL, frais_versement DOUBLE PRECISION NOT NULL, is_exoneration TINYINT(1) NOT NULL, is_deces_majore TINYINT(1) NOT NULL, etat INT NOT NULL, created_at DATETIME NOT NULL, updated_at DATETIME DEFAULT NULL, INDEX IDX_B915C91A69877B02 (dossier_retraite_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('ALTER TABLE contrat_retraite ADD CONSTRAINT FK_4AA0850869877B02 FOREIGN KEY (dossier_retraite_id) REFERENCES dossier_retraite (id)');
$this->addSql('ALTER TABLE garanties_retraite ADD CONSTRAINT FK_B915C91A69877B02 FOREIGN KEY (dossier_retraite_id) REFERENCES dossier_retraite (id)');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('DROP TABLE contrat_retraite');
$this->addSql('DROP TABLE garanties_retraite');
}
}