AC-10737: bin/magento setup:db:status command doesn’t recognize JSON data type
The AC-10737 patch fixes the issue where the bin/magento setup:db:status command does not recognize the JSON data type. This patch is available when the Quality Patches Tool (QPT) 1.1.79 is installed. The patch ID is AC-10737. Please note that this issue is scheduled to be fixed in Adobe Commerce 2.4.7-p5.
Affected products and versions
The patch is created for Adobe Commerce version:
- Adobe Commerce (all deployment methods) 2.4.6-p15
Compatible with Adobe Commerce versions:
- Adobe Commerce (all deployment methods) 2.4.4 - 2.4.7-p4
magento/quality-patches package to the latest version and check the compatibility on the Quality Patches Tool: Search for patches page. Use the patch ID as a search keyword to locate the patch.Issue
The bin/magento setup:db:status command does not recognize JSON column types and incorrectly reports that the declarative schema is not up to date.
Steps to reproduce:
-
Create a custom module that defines a new table with a
JSONcolumn indb_schema.xml, for example:code language-none <table name="example_table" engine="innodb" resource="default"> <column xsi:type="int" name="entity_id" identity="true" nullable="false" unsigned="true"/> <column xsi:type="json" name="content" nullable="false"/> <constraint referenceId="PRIMARY" xsi:type="primary"> <column name="feed_missing_id"/> </constraint> </table> -
Generate the whitelist for the module:
code language-none bin/magento setup:db-declaration:generate-whitelist --module-name Sample_Module -
Upgrade the database schema:
code language-none bin/magento setup:upgrade -
Check the declarative schema status:
code language-none bin/magento setup:db:status -
Observe that the command reports the declarative schema as not up to date.
Expected results:
- The
setup:db:statuscommand reports that the declarative schema is up to date.
Actual results:
- The command reports that the declarative schema is not up to date and displays the following message:
Declarative Schema is not up to date
Run 'setup:upgrade' to update your DB schema and data.
Apply the patch
To apply individual patches, use the following links depending on your deployment method:
- Adobe Commerce or Magento Open Source on-premises: Quality Patches Tool > Usage in the Quality Patches Tool guide.
- Adobe Commerce on cloud infrastructure: Upgrades and Patches > Apply Patches in the Commerce on Cloud Infrastructure guide.
Related reading
To learn more about Quality Patches Tool, refer to:
- Quality Patches Tool: A self-service tool for quality patches in the Tools guide.