<?php
declare(strict_types=1);
namespace DoctrineMigrations;
use Doctrine\Migrations\AbstractMigration;
use Doctrine\DBAL\Schema\Schema;
/**
* Auto-generated Migration: Please modify to your needs!
*/
class Version20220225095002 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->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \'mysql\'.');
$this->addSql('ALTER TABLE typologie CHANGE code_traduction code_traduction INT DEFAULT NULL');
$this->addSql('ALTER TABLE theme CHANGE code_traduction code_traduction INT NOT NULL');
$this->addSql('ALTER TABLE destination CHANGE id_iresa id_iresa INT NOT NULL, CHANGE code_traduction code_traduction INT NOT NULL');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \'mysql\'.');
$this->addSql('ALTER TABLE destination CHANGE id_iresa id_iresa VARCHAR(255) NOT NULL COLLATE utf8_unicode_ci, CHANGE code_traduction code_traduction VARCHAR(255) NOT NULL COLLATE utf8_unicode_ci');
$this->addSql('ALTER TABLE theme CHANGE code_traduction code_traduction VARCHAR(255) NOT NULL COLLATE utf8_unicode_ci');
$this->addSql('ALTER TABLE typologie CHANGE code_traduction code_traduction VARCHAR(255) DEFAULT NULL COLLATE utf8_unicode_ci');
}
}