<?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 Version20230601140350 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 oim_case_tasks
CHANGE description
description TEXT NOT NULL COMMENT \'description of this task\'
'
);
$this->addSql(
'
ALTER TABLE oim_conversations
CHANGE conversation_notes
conversation_notes TEXT DEFAULT NULL COMMENT \'Notes of this conversation\'
'
);
$this->addSql(
'
ALTER TABLE oim_measures
CHANGE description
description TEXT DEFAULT NULL COMMENT \'description of this measure\',
CHANGE date_from
date_from DATETIME DEFAULT NULL COMMENT \'start date of measure\',
CHANGE date_to
date_to DATETIME DEFAULT NULL COMMENT \'end date of measure\',
CHANGE finish_comment
finish_comment TEXT DEFAULT NULL COMMENT \'comment after finished measure\'
'
);
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE oim_case_tasks CHANGE description description MEDIUMTEXT NOT NULL COMMENT \'description of this task\'');
$this->addSql('ALTER TABLE oim_conversations CHANGE conversation_notes conversation_notes MEDIUMTEXT DEFAULT NULL COMMENT \'Notes of this conversation\'');
$this->addSql('UPDATE oim_measures SET date_from = \'1000-01-01 00:00:00\' WHERE date_from IS NULL');
$this->addSql('UPDATE oim_measures SET date_to = \'1000-01-01 00:00:00\' WHERE date_to IS NULL');
$this->addSql('ALTER TABLE oim_measures CHANGE description description MEDIUMTEXT DEFAULT NULL COMMENT \'description of this measure\', CHANGE date_from date_from DATETIME NOT NULL COMMENT \'start date of measure\', CHANGE date_to date_to DATETIME NOT NULL COMMENT \'end date of measure\', CHANGE finish_comment finish_comment MEDIUMTEXT DEFAULT NULL COMMENT \'comment after finished measure\'');
}
}