Skip to content

char column in db_schema.xml

https://developer.adobe.com/commerce/php/development/components/declarative-schema/configuration/#column-subnode

I didn’t find the char type (only varchar) in the column section but in the length section char is present.

I tried to use char myself like so:

<column xsi:type="char" name="hash" nullable="false" length="32" comment="MD5"/>

and it seems to properly create a column in the database
char(32) in the table

QUESTION:
Is it supported/recommended in Magento2 to use the char type in db_schema.xml and documentation is just not full enough, or it is indeed not supported so there is no mistake in the documentation?

Thank you.