fix: replace removed DBAL4 'json_array' type in install migration#16
Merged
Merged
Conversation
DBAL 4 (shipped with OroCommerce 7.0 / Symfony 7) removed the 'json_array' column type (deprecated since DBAL 2.6, gone in DBAL 3). The bundle installer still declared serialized_data as 'json_array', so a fresh `oro:install` aborted with "Unknown column type 'json_array' requested" before the synolia_stock_alert table was created. This was invisible to the platform:update path (an existing migrated DB short-circuits getMigrationVersion and never runs the create), so it only surfaces on a from-scratch install (CI / clean environments). Use the native Types::JSON, which is the Oro 7.0 convention for the serialized_data column of extend entities; the stale legacy '(DC2Type:array)' comment and length=0 are dropped accordingly.
9a77a87 to
b66126f
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.
Why
A fresh
oro:installon OroCommerce 7.0 aborts with:DBAL 4 (shipped with OroCommerce 7.0 / Symfony 7) removed the
json_arraycolumn type (deprecated since DBAL 2.6, gone in DBAL 3). The installer still declaredserialized_dataasjson_array, so the install aborts beforesynolia_stock_alertis created.This was invisible to the
oro:platform:updatepath (an existing migrated DB short-circuitsgetMigrationVersion()and never runs the table creation), so it only surfaces on a from-scratch install (CI / clean environments).What
serialized_datanow uses the nativeTypes::JSON, which is the Oro 7.0 convention for the serialized-data column of extend entities. The stale legacy(DC2Type:array)comment andlength => 0are dropped accordingly.Follow-up to the 7.0 migration (#15): this DBAL 4 break in the migration installer was missed there.