New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bin/magento setup:db:status does not recognize JSON type #38278
Comments
Hi @MTheProgrammer. Thank you for your report.
Join Magento Community Engineering Slack and ask your questions in #github channel. |
Hi @engcom-November. Thank you for working on this issue.
|
Hello @MTheProgrammer, Thank you for the report and collaboration! We tried to reproduce this issue on 2.4-develop, but in our case it is not reproducible. Please find the custom module used here, and let us know if we are missing anything. Thank you. |
Hello, thank you for the quick response. Have you tested with MySQL or MariaDB? The problem only affects MariaDB. You can use Mark Shust's docker for Magento to quickly setup the infrastructure. I was able to reproduce the issue with your custom module. |
Hello @MTheProgrammer, Thank you for the quick response! We were able to verify this issue on 2.4-develop with MariaDB as database. Hence confirming the issue. Thank you. |
✅ Jira issue https://jira.corp.adobe.com/browse/AC-10737 is successfully created for this GitHub issue. |
✅ Confirmed by @engcom-November. Thank you for verifying the issue. |
Preconditions and environment
Command
setup:db:status
is useful for deployment tools to determine whethersetup:upgrade
should be run.Steps to reproduce
Create a module with a new table with JSON column:
db_schema.xml
:Run
Expected result
Reported schema is up to date
Actual result
Additional information
You can debug results with breakpoint or
var_dump
in\Magento\Framework\Setup\Declaration\Schema\UpToDateDeclarativeSchema::isUpToDate
Search for
old
andnew
phrases, e.g.bin/magento setup:db:status | grep old -n10
. Following results indicate that the column type is resolved from the database aslongtext
but the new value isjson
. JSON is stored aslongtext
and the diff will always report that columns differ.Perhaps this is only an issue in MariaDB because JSON is an alias for LONGTEXT and should work fine on MySQL.
Sample output:
Workaround: use
longtext
instead ofjson
.Release note
No response
Triage and priority
The text was updated successfully, but these errors were encountered: