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
NOTE
The patch might become applicable to other versions with new Quality Patches Tool releases. To check if the patch is compatible with your Adobe Commerce version, update the 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:

  1. Create a custom module that defines a new table with a JSON column in db_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>
    
  2. Generate the whitelist for the module:

    code language-none
    bin/magento setup:db-declaration:generate-whitelist --module-name Sample_Module
    
  3. Upgrade the database schema:

    code language-none
    bin/magento setup:upgrade
    
  4. Check the declarative schema status:

    code language-none
    bin/magento setup:db:status
    
  5. Observe that the command reports the declarative schema as not up to date.

Expected results:

  1. The setup:db:status command reports that the declarative schema is up to date.

Actual results:

  1. 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:

To learn more about Quality Patches Tool, refer to:

recommendation-more-help
commerce-operations-help-tools