Skip to content

Commit

Permalink
Merge pull request #4823 from NCI-Agency/migrate-custom-security-mark…
Browse files Browse the repository at this point in the history
…ing-to-core-field

Migrate custom report field "securityMarkings" to standard "classification"
  • Loading branch information
gjvoosten committed Jul 3, 2024
2 parents a6aca0c + 190fc00 commit 4ac0955
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/main/resources/migrations.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5848,4 +5848,17 @@
</sql>
</changeSet>

<changeSet id="migrate-custom-security-marking-to-report-classification" author="midmarch">
<sql>
<!-- Migrate report.customFields.securityMarking to report.classification -->
UPDATE reports
SET classification = "customFields"::jsonb->>'securityMarking';

<!-- Replace report.classification empty strings with NULL -->
UPDATE reports
SET classification = NULL
WHERE classification = '';
</sql>
</changeSet>

</databaseChangeLog>

0 comments on commit 4ac0955

Please sign in to comment.