<?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 Version20220426112129 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 recomposition (id INT AUTO_INCREMENT NOT NULL, annee_academique_id INT NOT NULL, affectation_ue_ect_id INT NOT NULL, ue_ect_id INT NOT NULL, date_recomposition DATE DEFAULT NULL, created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, INDEX IDX_2D566FEB00F076 (annee_academique_id), INDEX IDX_2D566FE55D6609F (affectation_ue_ect_id), INDEX IDX_2D566FEEA5D1D28 (ue_ect_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('ALTER TABLE recomposition ADD CONSTRAINT FK_2D566FEB00F076 FOREIGN KEY (annee_academique_id) REFERENCES annee_academique (id)');
$this->addSql('ALTER TABLE recomposition ADD CONSTRAINT FK_2D566FE55D6609F FOREIGN KEY (affectation_ue_ect_id) REFERENCES affectation_ue_ecue (id)');
$this->addSql('ALTER TABLE recomposition ADD CONSTRAINT FK_2D566FEEA5D1D28 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 recomposition');
}
}