From 05bc43d566a1f46197933c9406704eadf9481a4d Mon Sep 17 00:00:00 2001 From: Daniel Seifert Date: Wed, 2 Aug 2023 10:34:48 +0200 Subject: [PATCH] fix wrong instantiation --- migration/data/Version20230403083243.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/migration/data/Version20230403083243.php b/migration/data/Version20230403083243.php index 83a5034..20afe4b 100644 --- a/migration/data/Version20230403083243.php +++ b/migration/data/Version20230403083243.php @@ -5,6 +5,7 @@ declare(strict_types=1); namespace D3\CategoryLongtext\Migrations; use Doctrine\DBAL\DBALException; +use Doctrine\DBAL\Types\Type; use Doctrine\Migrations\AbstractMigration; use Doctrine\DBAL\Schema\Schema; use Doctrine\DBAL\Schema\SchemaException; @@ -33,20 +34,20 @@ final class Version20230403083243 extends AbstractMigration $table = $schema->getTable('oxcategories'); if (!$table->hasColumn('D3LONGDESC2')){ - $table->addColumn('D3LONGDESC2', (new TextType())->getName()) + $table->addColumn('D3LONGDESC2', (Type::getType('text')->getName())) ->setNotnull(true); } $table->hasColumn('D3LONGDESC2_1') ?: - $table->addColumn('D3LONGDESC2_1', (new TextType())->getName()) + $table->addColumn('D3LONGDESC2_1', (Type::getType('text')->getName())) ->setNotnull(true); $table->hasColumn('D3LONGDESC2_2') ?: - $table->addColumn('D3LONGDESC2_2', (new TextType())->getName()) + $table->addColumn('D3LONGDESC2_2', (Type::getType('text')->getName())) ->setNotnull(true); $table->hasColumn('D3LONGDESC2_3') ?: - $table->addColumn('D3LONGDESC2_3', (new TextType())->getName()) + $table->addColumn('D3LONGDESC2_3', (Type::getType('text')->getName())) ->setNotnull(true); }