<?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 Version20220613181530 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 school_absence_and_delay CHANGE situation situation VARCHAR(255) NOT NULL, CHANGE duration_type duration_type VARCHAR(255) NOT NULL');
$this->addSql('ALTER TABLE school_average ADD code VARCHAR(20) NOT NULL');
$this->addSql('CREATE UNIQUE INDEX UNIQ_316C1DE177153098 ON school_average (code)');
$this->addSql('ALTER TABLE school_student_average ADD code VARCHAR(20) NOT NULL');
$this->addSql('CREATE UNIQUE INDEX UNIQ_D0D0422D77153098 ON school_student_average (code)');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE school_absence_and_delay CHANGE situation situation VARCHAR(255) CHARACTER SET utf8mb4 NOT NULL COLLATE `utf8mb4_unicode_ci`, CHANGE duration_type duration_type VARCHAR(255) CHARACTER SET utf8mb4 NOT NULL COLLATE `utf8mb4_unicode_ci`');
$this->addSql('DROP INDEX UNIQ_316C1DE177153098 ON school_average');
$this->addSql('ALTER TABLE school_average DROP code');
$this->addSql('DROP INDEX UNIQ_D0D0422D77153098 ON school_student_average');
$this->addSql('ALTER TABLE school_student_average DROP code');
}
}