Issue Bug Closed

#105310\TYPO3\CMS\Core\Database\Schema\Parser\Parser translates CHAR to VARCHAR

Alexander Schnitzler 10/15/24, 07:56 updated 12/02/25, 14:32

Description

Given the following ext_tables.sql

CREATE TABLE table (
  column CHAR(2),
);

the schema parser detects a char-type but it translates it into a doctrine/dbal type string without fixed set to true. So, this will be translated to

CREATE TABLE table (
  column VARCHAR(2),
);

This would be fixed if the constructor of \TYPO3\CMS\Core\Database\Schema\Parser\AST\DataType\CharDataType sets its fixed property to true.
Alternatively, fixed could be part of the options passed into the constructor.

Reviews 6