<?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 Version20250618073202 extends AbstractMigration
{
public function getDescription(): string
{
return 'Rajout des champs is_blocked dans les entités AcademyCategory, AcademyChapter et AcademySubChapter';
}
public function up(Schema $schema): void
{
// this up() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE app_academy CHANGE guid guid VARCHAR(36) NOT NULL');
$this->addSql('ALTER TABLE app_academy_category ADD is_blocked TINYINT(1) NOT NULL');
$this->addSql('ALTER TABLE app_academy_chapter ADD is_blocked TINYINT(1) NOT NULL');
$this->addSql('ALTER TABLE app_academy_sub_chapter ADD is_blocked TINYINT(1) NOT NULL');
$this->addSql('ALTER TABLE app_media_content DROP is_required');
$this->addSql('ALTER TABLE app_media_content ADD is_blocked TINYINT(1) NOT NULL');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE app_academy CHANGE guid guid VARCHAR(36) CHARACTER SET utf8mb4 DEFAULT NULL COLLATE `utf8mb4_unicode_ci`');
$this->addSql('ALTER TABLE app_academy_category DROP is_blocked');
$this->addSql('ALTER TABLE app_academy_chapter DROP is_blocked');
$this->addSql('ALTER TABLE app_academy_sub_chapter DROP is_blocked');
$this->addSql('ALTER TABLE app_media_content ADD is_required TINYINT(1) NOT NULL');
$this->addSql('ALTER TABLE app_media_content DROP is_blocked');
}
}