Closed NovakHonza closed 1 year ago
Is it backward compatible ?
Is it backward compatible ?
Doctrine team recommended this change for years, and both types are present in dbal 2.x.
As I think about it, there might be a need for migration for existing installations? Because of the need to change the comment on the data
column (DC2Type:json_array) to (DC2Type:json)?
As I think about it, there might be a need for migration for existing installations? Because of the need to change the comment on the
data
column (DC2Type:json_array) to (DC2Type:json)?
Comment on column type is not used by Doctrine ORM code itself. It is generated so that reverse-engineering tools can properly recover schema in cases where a custom type (like json
or json_array
) is used.
See https://symfony.com/doc/6.3/doctrine/reverse_engineering.html
The doctrine:mapping:import command used to generate Doctrine entities from existing databases was deprecated by Doctrine in 2019 and there's no replacement for it.
Reverse Engineering is a one-time process that can get you started with a project. Converting an existing database schema into mapping files only detects about 70-80% of the necessary mapping information. Additionally the detection from an existing database cannot detect inverse associations, inheritance types, entities with foreign keys as primary keys and many of the semantical operations on associations such as cascade.
This should be a fix for #1293