If a Magento 2 online shop displays the error message "The attribute 'length' is not allowed." when attempting to run bin/magento setup:upgrade, preceded by the message "The XML in file 'db_schema.xml' is invalid", it may be necessary to adjust the XML structure.
For example, if you find a line with xsi:type="int" that contains the length attribute, such as:
<column xsi:type="int" name="download_loft_status" nullable="false" length="1" comment="download_loft_status"/>
you can remove the length attribute:
<column xsi:type="int" name="download_loft_status" nullable="false" comment="download_loft_status"/>
Then run the following command again:
bin/magento setup:upgrade
This issue was encountered by our web agency in a Magento 2.3 online shop.
