Skip to content

PostgreSQL jsonb support in schema update tool. #2541

@michalwiking

Description

@michalwiking

It was reported in doctrine but i found its dbal issue.

doctrine/orm#5797

Un: https://github.com/doctrine/dbal/blob/master/lib/Doctrine/DBAL/Platforms/PostgreSqlPlatform.php#L521 there is no if for checking jsonb option. Changed column is passed to getAlterTableSQL in changedColumns array but no SQL is generated.

And i think its both ways from jsonb true to false and from false to true.

When you try to change json_array column to jsonb => true doctrine:schema:update prints:
Nothing to update - your database is already in sync with the current entity metadata.

To reproduce:

  1. Create entity with json_array field
  2. Create schema
  3. Change column, add options={"jsonb": true}
  4. Run doctrine:schema:update

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions