connection->getDatabasePlatform()->registerDoctrineTypeMapping('enum', 'string'); $table = $schema->getTable('oxcategories'); $table->hasColumn('D3LONGDESC2') ?: $table->addColumn('D3LONGDESC2', (new TextType::class)->getName()) ->setNotnull(true); $table->hasColumn('D3LONGDESC2_1') ?: $table->addColumn('D3LONGDESC2_1', (new TextType::class)->getName()) ->setNotnull(true); $table->hasColumn('D3LONGDESC2_2') ?: $table->addColumn('D3LONGDESC2_2', (new TextType::class)->getName()) ->setNotnull(true); $table->hasColumn('D3LONGDESC2_3') ?: $table->addColumn('D3LONGDESC2_3', (new TextType::class)->getName()) ->setNotnull(true); $this->postProcesses(); } /** * @throws DatabaseErrorException * @throws DatabaseConnectionException */ public function postProcesses(){ $sAltering = 'ALTER TABLE oxcategories MODIFY ? text CHARACTER SET latin1 COLLATE latin1_swedish_ci;'; $aAlterColumns = [ 'D3LONGDESC2', 'D3LONGDESC2_1', 'D3LONGDESC2_2', 'D3LONGDESC2_3' ]; foreach ($aAlterColumns as $column){ DatabaseProvider::getDb()->execute($sAltering, $column); } } public function down(Schema $schema) : void { // this down() migration is auto-generated, please modify it to your needs } }