mirror of
https://github.com/doctrine/orm.git
synced 2026-03-23 22:42:18 +01:00
PostgreSQL schema:update ignore removing jsonb => true on json_array field #5300
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @michalwiking on GitHub (Oct 22, 2016).
When you add column:
@ORM\Column(type="json_array", nullable=true, options={"jsonb": true})
Update schema and remove options than schema:update prints: nothing to change but json_array default type is JSON not JSONB, it schould alter column and change type.
Altering code depends on : https://github.com/doctrine/dbal/blob/master/lib/Doctrine/DBAL/Schema/Comparator.php#L491
It compare changes on columns, try to array_intersect_key but https://github.com/doctrine/doctrine2/blob/master/lib/Doctrine/ORM/Tools/SchemaTool.php#L389 dont add jsonb key to platformOptions
and in comparator : array_intersect_key(array('jsonb'), array()) return empty array.