db.changelog.20210526-remove-deprecated-verification-fields.yaml Maven / Gradle / Ivy
databaseChangeLog:
- changeSet:
id: remove-deprecated-verification-fields
author: fletch
changes:
- sql:
sql: |
update environment
set verifications = json_set(verifications, '$[0].image', verifications ->> '$[0].imageId')
where json_length(verifications) > 0
and verifications ->> '$[0].image' is null;
- sql:
sql: |
update environment
set verifications = json_remove(verifications, '$[0].imageId', '$[0].repository', '$[0].tag')
where json_length(verifications) > 0;