<?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 Version20220825155029 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 diplome (id INT AUTO_INCREMENT NOT NULL, annee_academique_id INT NOT NULL, niveau_id INT NOT NULL, filiere_id INT NOT NULL, nom VARCHAR(50) NOT NULL, created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, deleted_at DATETIME DEFAULT NULL, INDEX IDX_EB4C4D4EB00F076 (annee_academique_id), INDEX IDX_EB4C4D4EB3E9C81 (niveau_id), INDEX IDX_EB4C4D4E180AA129 (filiere_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('ALTER TABLE diplome ADD CONSTRAINT FK_EB4C4D4EB00F076 FOREIGN KEY (annee_academique_id) REFERENCES annee_academique (id)');
$this->addSql('ALTER TABLE diplome ADD CONSTRAINT FK_EB4C4D4EB3E9C81 FOREIGN KEY (niveau_id) REFERENCES niveau (id)');
$this->addSql('ALTER TABLE diplome ADD CONSTRAINT FK_EB4C4D4E180AA129 FOREIGN KEY (filiere_id) REFERENCES filiere (id)');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('DROP TABLE diplome');
}
}