magento/magento2#38798: Cannot change column type in some cases #39932
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description (*)
Error happens here
vendor/magento/framework/Config/Reader/Filesystem.php 186
As the author of the issue noticed, an interesting solution is proposed in
#26155 (comment)
but for now I'll just stick to changing the type, if there are other suggestions I'll be happy to consider them
https://developer.adobe.com/commerce/php/development/components/declarative-schema/configuration/#change-the-column-type
Related Pull Requests
26160
Fixed Issues (if relevant)
Manual testing scenarios (*)
1.create new module, or use existing one from app/code/
2.add this snippet to db_schema.xml
<table name="eav_attribute"> <column xsi:type="text" name="note" nullable="true" comment="Note"/> </table>
3.use bin/magento setup:upgrade command
4.see error "Element 'column', attribute 'length': The attribute 'length' is not allowed."
Questions or comments
Contribution checklist (*)