Skip to content
This repository has been archived by the owner on Oct 15, 2024. It is now read-only.

Commit

Permalink
Merge pull request #18 from kids-first/fix-rename-study
Browse files Browse the repository at this point in the history
Fix study name for CBTTC Atlas
  • Loading branch information
Jeremy Costanza authored Aug 8, 2019
2 parents e16474c + 2650ead commit 8ffae4e
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions src/main/resources/flyway/sql/V4__rename_study_cbttc_atlas.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
/**
* Database migration script for Riff's PostgreSQL database.
*
* This script renames the study names stored in the queries for the cohort builder and the file repository.
* This is done so that the former queries remain valid once the studies have been renamed in the release coordinator.
*
* @date 2019-08-07
*/

/*
* The search queries in the cohort builder are stored as JSON.
* We include the initial double quote, to reduce risks of false positives.
*/
UPDATE riff SET content = REPLACE(content::TEXT, '"Consortium: Pediatric Brain Tumors - CBTTC', '"Pediatric Brain Tumor Atlas: CBTTC')::JSON;

/*
* The search queries in the file repository are stored as their full URL. The SQON is therefore URL-encoded:
* We include the initial double quote, to reduce risks of false positives.
*/
UPDATE riff SET content = REPLACE(content::TEXT, '%22Consortium3A%20Pediatric%20Brain%20Tumors%20-%20CBTTC', '%22Pediatric%20Brain%20Tumors%20Atlas%3A%20CBTTC')::JSON;

0 comments on commit 8ffae4e

Please sign in to comment.