
Upgrading from Symfony 3 to 4 - JSON Database Content
My latest adventure has been to upgrade a web application from Symfony 3.3 to 4. All the pages load and I am starting to test execution.
This error came up and I scoured the code for instances of AppBundle
Then I checked the database.
One of the attributes is custom_attributes, which is a JSON column. Sample content:
[{"#type":"AppBundle\\Entity\\CustomAttribute","key":"expiration","value":"2018-02-26","valueValidExpiration":true,"valueValidChannels":true},{"#type":"AppBundle\\Entity\
\CustomAttribute","key":"channels","value":6,"valueValidExpiration":true,"valueValidChannels":true}]
I am using https://github.com/dunglas/doctrine-json-odm to provide JSON data within entities.
To change AppBundle to App, I used:
dev=# UPDATE asset SET custom_attributes= REPLACE(custom_attributes::TEXT,'AppBundle','App')::json;
UPDATE 25
dev=# UPDATE model SET custom_attributes= REPLACE(custom_attributes::TEXT,'AppBundle','App')::json;
UPDATE 9
Print article | This entry was posted by elvis on 04/23/18 at 02:50:00 am . Follow any responses to this post through RSS 2.0. |