Repository navigation
Conversation
…ready JSON A database installed with SchemaBuilderEvent and migrated later has these columns as JSON already, so the conversion has nothing to do there. The check looks for the json_valid() constraint MariaDB gives a JSON column, on every column the file converts. It reads information_schema, because Doctrine DBAL 3 reports a 4.6 LONGTEXT column with a "(DC2Type:json)" comment as JSON too.
This was referenced Oct 8, 2026
It maps each table to the JSON column converted in it.
Steveb-p
force-pushed
the
feature/schema-migration-guards-5.0
branch
from
October 27, 2026 10:14
341de9c to
59f7ac6
Compare
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.



Note
Parked as a draft, to come back to later.
Related PRs:
Description:
Brings back a check before
ConvertMariaDbJsonColumnsMigrationrunssql/convert-json-columns-mariadb.sql.Doctrine Migrations isn't mandatory on 5.0 yet, so a site installed through
SchemaBuilderEventcan runibexa:doctrine:migrations:migratelater. Its columns are JSON already, so theMODIFYstatements change nothing: on MariaDB 10.11 they're all accepted withALGORITHM=INSTANT, andSHOW CREATE TABLEstays byte-identical. Still, each one is anALTER TABLEthat briefly takes an exclusive metadata lock, and it waits behind any long-running transaction on that table. With the check, those sites get noALTERat all.The check isn't the one from #787 brought back. It looks for the
json_valid()constraint MariaDB gives a JSON column on every column the file converts, not only the last one. It readsinformation_schema.CHECK_CONSTRAINTS, because Doctrine'sSchemacan't tell the difference on 5.0: DBAL 3 goes by the(DC2Type:json)comment, which the LONGTEXT columns from 4.6 have too, and reports both as JSON.The trade-off: a fresh migrations install skips the statements as well, because it creates the columns in their final form. So nothing that only checks fresh installs, such as the schema alignment test if it ever runs on MariaDB, covers the SQL file anymore.
Checked on MariaDB 10.11 by running the migrations directly: skipped on fresh 5.0 installs through either path and on a re-run, run on a 4.6 database (identical to a fresh 5.0 install afterwards, data kept), and invalid JSON still fails the conversion.