<?php
declare(strict_types=1);
namespace DoctrineMigrations;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;
final class Version20221206132225 extends AbstractMigration
{
public function getDescription(): string
{
return 'Change type of description mandate from varchar(255) to text';
}
public function up(Schema $schema): void
{
$this->addSql('ALTER TABLE property ALTER description_mandate TYPE TEXT');
$this->addSql('ALTER TABLE property ALTER description_mandate DROP DEFAULT');
}
public function down(Schema $schema): void
{
$this->addSql('ALTER TABLE property ALTER description_mandate TYPE VARCHAR(255)');
$this->addSql('ALTER TABLE property ALTER description_mandate DROP DEFAULT');
}
}