change fieldtype to "text"

This commit is contained in:
Thomas Dartsch 2024-11-13 16:34:45 +01:00
parent 4c7472ef82
commit 51a375bbb7
2 changed files with 10 additions and 10 deletions

View File

@ -8,7 +8,7 @@ use Doctrine\DBAL\Schema\Schema;
use Doctrine\DBAL\Types\DateTimeType; use Doctrine\DBAL\Types\DateTimeType;
use Doctrine\DBAL\Types\DateType; use Doctrine\DBAL\Types\DateType;
use Doctrine\DBAL\Types\IntegerType; use Doctrine\DBAL\Types\IntegerType;
use Doctrine\DBAL\Types\StringType; use Doctrine\DBAL\Types\TextType;
use Doctrine\Migrations\AbstractMigration; use Doctrine\Migrations\AbstractMigration;
/** /**
@ -46,8 +46,8 @@ final class Version20241023154223 extends AbstractMigration
// Beschreibung // Beschreibung
if (!$table->hasColumn('D3DESCRIPTION')) { if (!$table->hasColumn('D3DESCRIPTION')) {
$table->addColumn('D3DESCRIPTION', (new StringType())->getName()) $table->addColumn('D3DESCRIPTION', (new TextType())->getName())
->setLength(255) ->setLength($this->connection->getDatabasePlatform()::LENGTH_LIMIT_TEXT)
->setNotnull(true); ->setNotnull(true);
} }
} }

View File

@ -5,7 +5,7 @@ declare(strict_types=1);
namespace D3\ManufacturerInformation\Migrations; namespace D3\ManufacturerInformation\Migrations;
use Doctrine\DBAL\Schema\Schema; use Doctrine\DBAL\Schema\Schema;
use Doctrine\DBAL\Types\StringType; use Doctrine\DBAL\Types\TextType;
use Doctrine\Migrations\AbstractMigration; use Doctrine\Migrations\AbstractMigration;
/** /**
@ -43,22 +43,22 @@ final class Version20241028172608 extends AbstractMigration
// lang 1 // lang 1
if (!$table->hasColumn('D3DESCRIPTION_1')) { if (!$table->hasColumn('D3DESCRIPTION_1')) {
$table->addColumn('D3DESCRIPTION_1', (new StringType())->getName()) $table->addColumn('D3DESCRIPTION_1', (new TextType\())->getName())
->setLength(255) ->setLength($this->connection->getDatabasePlatform()::LENGTH_LIMIT_TEXT)
->setNotnull(true); ->setNotnull(true);
} }
// lang 2 // lang 2
if (!$table->hasColumn('D3DESCRIPTION_2')) { if (!$table->hasColumn('D3DESCRIPTION_2')) {
$table->addColumn('D3DESCRIPTION_2', (new StringType())->getName()) $table->addColumn('D3DESCRIPTION_2', (new TextType\())->getName())
->setLength(255) ->setLength($this->connection->getDatabasePlatform()::LENGTH_LIMIT_TEXT)
->setNotnull(true); ->setNotnull(true);
} }
// lang 3 // lang 3
if (!$table->hasColumn('D3DESCRIPTION_3')) { if (!$table->hasColumn('D3DESCRIPTION_3')) {
$table->addColumn('D3DESCRIPTION_3', (new StringType())->getName()) $table->addColumn('D3DESCRIPTION_3', (new TextType\())->getName())
->setLength(255) ->setLength($this->connection->getDatabasePlatform()::LENGTH_LIMIT_TEXT)
->setNotnull(true); ->setNotnull(true);
} }
} }