<?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 Version20220405133844 extends AbstractMigration
{
public function getDescription(): string
{
return 'évaluation des acquis';
}
public function up(Schema $schema): void
{
// this up() migration is auto-generated, please modify it to your needs
$this->addSql('CREATE TABLE livret_evaluation (id INT AUTO_INCREMENT NOT NULL, eleve_id INT NOT NULL, acquis_id INT NOT NULL, commentaire LONGTEXT NOT NULL, faits LONGTEXT NOT NULL COMMENT \'(DC2Type:json)\', INDEX IDX_CBF0032AA6CC7B2 (eleve_id), INDEX IDX_CBF0032A962D6790 (acquis_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE `utf8_unicode_ci` ENGINE = InnoDB');
$this->addSql('ALTER TABLE livret_evaluation ADD CONSTRAINT FK_CBF0032AA6CC7B2 FOREIGN KEY (eleve_id) REFERENCES user (id)');
$this->addSql('ALTER TABLE livret_evaluation ADD CONSTRAINT FK_CBF0032A962D6790 FOREIGN KEY (acquis_id) REFERENCES livret_acquis (id)');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('DROP TABLE livret_evaluation');
}
}