<?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 Version20220202173503 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 rattrapage (id INT AUTO_INCREMENT NOT NULL, annee_academique_id INT NOT NULL, inscription_id INT NOT NULL, ue_ect_id INT NOT NULL, date_rattrapage DATE DEFAULT NULL, moyenne DOUBLE PRECISION NOT NULL, INDEX IDX_BDE5586DB00F076 (annee_academique_id), INDEX IDX_BDE5586D5DAC5993 (inscription_id), INDEX IDX_BDE5586DEA5D1D28 (ue_ect_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('ALTER TABLE rattrapage ADD CONSTRAINT FK_BDE5586DB00F076 FOREIGN KEY (annee_academique_id) REFERENCES annee_academique (id)');
$this->addSql('ALTER TABLE rattrapage ADD CONSTRAINT FK_BDE5586D5DAC5993 FOREIGN KEY (inscription_id) REFERENCES inscription (id)');
$this->addSql('ALTER TABLE rattrapage ADD CONSTRAINT FK_BDE5586DEA5D1D28 FOREIGN KEY (ue_ect_id) REFERENCES ue_ect (id)');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('DROP TABLE rattrapage');
}
}