<?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 Version20211001095844 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 tuteur (id INT AUTO_INCREMENT NOT NULL, etudiant_id INT DEFAULT NULL, nom VARCHAR(50) NOT NULL, prenom VARCHAR(100) NOT NULL, profession VARCHAR(100) DEFAULT NULL, employeur VARCHAR(100) DEFAULT NULL, adresse VARCHAR(200) NOT NULL, tel VARCHAR(50) DEFAULT NULL, email VARCHAR(255) DEFAULT NULL, responsable_frais TINYINT(1) NOT NULL, INDEX IDX_56412268DDEAB1A3 (etudiant_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('ALTER TABLE tuteur ADD CONSTRAINT FK_56412268DDEAB1A3 FOREIGN KEY (etudiant_id) REFERENCES etudiant (id)');
$this->addSql('ALTER TABLE etudiant CHANGE sexe sexe VARCHAR(255) NOT NULL');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('DROP TABLE tuteur');
$this->addSql('ALTER TABLE etudiant CHANGE sexe sexe VARCHAR(255) CHARACTER SET utf8mb4 NOT NULL COLLATE `utf8mb4_unicode_ci`');
}
}