mirror of
https://gitlab.com/wgp/dougal/software.git
synced 2025-12-06 10:37:07 +00:00
Fix query to account for new column type.
The type of the file_data.data column was
changed from JSON to JSONB by commit
2d270cdef9.
Fixes #54.
This commit is contained in:
@@ -563,7 +563,7 @@ class Datastore:
|
|||||||
INSERT INTO labels (name, data)
|
INSERT INTO labels (name, data)
|
||||||
SELECT l.key, l.value
|
SELECT l.key, l.value
|
||||||
FROM file_data fd,
|
FROM file_data fd,
|
||||||
json_each(fd.data->'labels') l
|
jsonb_each(fd.data->'labels') l
|
||||||
WHERE fd.data::jsonb ? 'labels'
|
WHERE fd.data::jsonb ? 'labels'
|
||||||
ON CONFLICT (name) DO UPDATE SET data = excluded.data;
|
ON CONFLICT (name) DO UPDATE SET data = excluded.data;
|
||||||
"""
|
"""
|
||||||
|
|||||||
Reference in New Issue
Block a user