Skip to content

Commit

Permalink
Merge pull request #65 from krzysztofruszczynski/JsonFixes
Browse files Browse the repository at this point in the history
Json fixes
  • Loading branch information
l3pp4rd authored Oct 9, 2019
2 parents 6a1f713 + e3fb270 commit 2582d9f
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/DataDog/AuditBundle/Entity/AuditLog.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ class AuditLog
private $blame;

/**
* @ORM\Column(type="json_array", nullable=true)
* @ORM\Column(type="json", nullable=true)
*/
private $diff;

Expand Down
4 changes: 2 additions & 2 deletions src/DataDog/AuditBundle/EventSubscriber/AuditSubscriber.php
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ protected function insert(EntityManager $em, $entity, array $ch)
'source' => $this->assoc($em, $entity),
'target' => null,
'blame' => $this->blame($em),
'diff' => json_encode($diff),
'diff' => $diff,
'tbl' => $meta->table['name'],
]);
}
Expand All @@ -293,7 +293,7 @@ protected function update(EntityManager $em, $entity, array $ch)
'source' => $this->assoc($em, $entity),
'target' => null,
'blame' => $this->blame($em),
'diff' => json_encode($diff),
'diff' => $diff,
'tbl' => $meta->table['name'],
]);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

<field name="action" length="12" />
<field name="tbl" length="128" />
<field name="diff" type="json_array" nullable="true" />
<field name="diff" type="json" nullable="true" />
<field name="loggedAt" type="datetime" />

<one-to-one field="source" target-entity="Association">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ DataDog\AuditBundle\Entity\AuditLog:
tbl:
length: 128
diff:
type: json_array
type: json
nullable: true
loggedAt:
type: datetime

0 comments on commit 2582d9f

Please sign in to comment.