diff options
author | Louis Chemineau <louis@chmn.me> | 2023-03-30 15:58:42 +0200 |
---|---|---|
committer | Louis Chemineau <louis@chmn.me> | 2023-04-03 14:06:28 +0200 |
commit | 1a6709cf434a6eeb7356254938b15c98d375a955 (patch) | |
tree | 998ecf3346c97092135193804d852d1247a25626 /lib/private/Metadata/FileMetadataMapper.php | |
parent | 691aa8d0257e9361bbc5a64b09cd634435dbd40a (diff) | |
download | nextcloud-server-1a6709cf434a6eeb7356254938b15c98d375a955.tar.gz nextcloud-server-1a6709cf434a6eeb7356254938b15c98d375a955.zip |
Migrate metadata as JSON to value as STRING
Signed-off-by: Louis Chemineau <louis@chmn.me>
Diffstat (limited to 'lib/private/Metadata/FileMetadataMapper.php')
-rw-r--r-- | lib/private/Metadata/FileMetadataMapper.php | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/private/Metadata/FileMetadataMapper.php b/lib/private/Metadata/FileMetadataMapper.php index f8f8df4bf3b..f3120e5e515 100644 --- a/lib/private/Metadata/FileMetadataMapper.php +++ b/lib/private/Metadata/FileMetadataMapper.php @@ -89,7 +89,7 @@ class FileMetadataMapper extends QBMapper { continue; } $empty = new FileMetadata(); - $empty->setMetadata([]); + $empty->setValue(''); $empty->setGroupName($groupName); $empty->setId($id); $metadata[$id] = $empty; @@ -132,13 +132,13 @@ class FileMetadataMapper extends QBMapper { $idType = $this->getParameterTypeForProperty($entity, 'id'); $groupNameType = $this->getParameterTypeForProperty($entity, 'groupName'); - $metadataValue = $entity->getMetadata(); - $metadataType = $this->getParameterTypeForProperty($entity, 'metadata'); + $value = $entity->getValue(); + $valueType = $this->getParameterTypeForProperty($entity, 'value'); $qb = $this->db->getQueryBuilder(); $qb->update($this->tableName) - ->set('metadata', $qb->createNamedParameter($metadataValue, $metadataType)) + ->set('value', $qb->createNamedParameter($value, $valueType)) ->where($qb->expr()->eq('id', $qb->createNamedParameter($id, $idType))) ->andWhere($qb->expr()->eq('group_name', $qb->createNamedParameter($groupName, $groupNameType))) ->executeStatement(); |