<?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 Version20220817124053 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('ALTER TABLE participation ADD monitor_id INT DEFAULT NULL');
$this->addSql('ALTER TABLE participation ADD CONSTRAINT FK_AB55E24F4CE1C902 FOREIGN KEY (monitor_id) REFERENCES user (id)');
$this->addSql('CREATE INDEX IDX_AB55E24F4CE1C902 ON participation (monitor_id)');
$this->addSql('ALTER TABLE training CHANGE time_slot time_slot ENUM(\'saturday_morning\', \'saturday_afternoon\', \'sunday_morning\', \'sunday_afternoon\')');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE participation DROP FOREIGN KEY FK_AB55E24F4CE1C902');
$this->addSql('DROP INDEX IDX_AB55E24F4CE1C902 ON participation');
$this->addSql('ALTER TABLE participation DROP monitor_id');
$this->addSql('ALTER TABLE training CHANGE time_slot time_slot VARCHAR(255) DEFAULT NULL');
}
}