Skip to content

Commit

Permalink
Merge 56204d3 into 9e81f56
Browse files Browse the repository at this point in the history
  • Loading branch information
mario-fehr committed Oct 8, 2022
2 parents 9e81f56 + 56204d3 commit 0dd2d10
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Content/Infrastructure/Doctrine/MetadataLoader.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public function loadClassMetadata(LoadClassMetadataEventArgs $event): void

if ($reflection->implementsInterface(TemplateInterface::class)) {
$this->addField($metadata, 'templateKey', 'string', ['length' => 32]);
$this->addField($metadata, 'templateData', 'json', ['nullable' => false]);
$this->addField($metadata, 'templateData', 'json', ['nullable' => false, 'options' => ['jsonb' => true]]);

$this->addIndex($metadata, 'idx_template_key', ['templateKey']);
}
Expand Down
9 changes: 9 additions & 0 deletions UPGRADE.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# Upgrade

## 0.6.x

### Use jsonb for PostgreSQL json columns

This effects only PostgreSQL databases:

```sql
ALTER TABLE <your_entity>_example_dimensions ALTER COLUMN templateData SET DATA TYPE jsonb USING templateData::jsonb;

## 0.6.3

### Add dimension, templateKey, workflowPublished and workflowPlace indexes
Expand Down

0 comments on commit 0dd2d10

Please sign in to comment.