You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by ma...@apache.org on 2020/04/27 21:58:43 UTC

[airavata] 03/04: AIRAVATA-3276 Moving data migration scripts to correct file

This is an automated email from the ASF dual-hosted git repository.

machristie pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/airavata.git

commit 96994d3c6ecff90a9e32fce429b277fa2e7a878f
Author: Marcus Christie <ma...@iu.edu>
AuthorDate: Mon Apr 27 17:56:18 2020 -0400

    AIRAVATA-3276 Moving data migration scripts to correct file
---
 .../DeltaScripts/appCatalog_schema_delta.sql          | 19 +++++++++++++++++++
 .../next/DeltaScripts/appCatalog_schema_delta.sql     | 19 -------------------
 2 files changed, 19 insertions(+), 19 deletions(-)

diff --git a/modules/registry/release-migration-scripts/0.18-0.19/DeltaScripts/appCatalog_schema_delta.sql b/modules/registry/release-migration-scripts/0.18-0.19/DeltaScripts/appCatalog_schema_delta.sql
index a2cc07a..1548106 100644
--- a/modules/registry/release-migration-scripts/0.18-0.19/DeltaScripts/appCatalog_schema_delta.sql
+++ b/modules/registry/release-migration-scripts/0.18-0.19/DeltaScripts/appCatalog_schema_delta.sql
@@ -491,3 +491,22 @@ CREATE TABLE IF NOT EXISTS COMPUTE_RESOURCE_RESERVATION_QUEUE (RESERVATION_ID VA
 )ENGINE=InnoDB DEFAULT CHARSET=latin1;
 CREATE INDEX IF NOT EXISTS I_CMPTN_Q_RESERVATION_ID ON COMPUTE_RESOURCE_RESERVATION_QUEUE (RESERVATION_ID);
 ALTER TABLE COMPUTE_RESOURCE_RESERVATION ADD CONSTRAINT FK_COMPUTE_RESOURCE_RESERVATION FOREIGN KEY IF NOT EXISTS (RESOURCE_ID, GROUP_RESOURCE_PROFILE_ID) REFERENCES GROUP_COMPUTE_RESOURCE_PREFERENCE (RESOURCE_ID, GROUP_RESOURCE_PROFILE_ID) ON DELETE CASCADE;
+
+-- AIRAVATA-3276 Replace JSON configuration: "toggle": ["isRequired"] ->
+-- "isRequired": true. Toggling requiredToAddedToCommandLine no longer needed.
+
+-- replace toggle with is isRequired
+update APPLICATION_INPUT
+set METADATA = REGEXP_REPLACE(METADATA, '"toggle": \\[[^}]+\\]', CONCAT('"isRequired": ', IF(IS_REQUIRED=1, 'true', 'false')))
+-- showOptions has "toggle" but not "isRequired"
+where METADATA rlike '"showOptions": {"toggle": \\[[^}]+\\]'
+  and NOT METADATA rlike '"showOptions": {.*"isRequired": (true|false)'
+;
+
+-- remove toggle since isRequired is already there
+update APPLICATION_INPUT
+set METADATA = REGEXP_REPLACE(METADATA, '(, )?"toggle": \\[[^}]+\\](, )?', '')
+-- showOptions has BOTH "toggle" and "isRequired"
+where METADATA rlike '"showOptions": {"toggle": \\[[^}]+\\]'
+  and METADATA rlike '"showOptions": {.*"isRequired": (true|false)'
+;
diff --git a/modules/registry/release-migration-scripts/next/DeltaScripts/appCatalog_schema_delta.sql b/modules/registry/release-migration-scripts/next/DeltaScripts/appCatalog_schema_delta.sql
index b9f4385..839c2e1 100644
--- a/modules/registry/release-migration-scripts/next/DeltaScripts/appCatalog_schema_delta.sql
+++ b/modules/registry/release-migration-scripts/next/DeltaScripts/appCatalog_schema_delta.sql
@@ -19,22 +19,3 @@
 --
 
 use app_catalog;
-
--- AIRAVATA-3276 Replace JSON configuration: "toggle": ["isRequired"] ->
--- "isRequired": true. Toggling requiredToAddedToCommandLine no longer needed.
-
--- replace toggle with is isRequired
-update APPLICATION_INPUT
-set METADATA = REGEXP_REPLACE(METADATA, '"toggle": \\[[^}]+\\]', CONCAT('"isRequired": ', IF(IS_REQUIRED=1, 'true', 'false')))
--- showOptions has "toggle" but not "isRequired"
-where METADATA rlike '"showOptions": {"toggle": \\[[^}]+\\]'
-  and NOT METADATA rlike '"showOptions": {.*"isRequired": (true|false)'
-;
-
--- remove toggle since isRequired is already there
-update APPLICATION_INPUT
-set METADATA = REGEXP_REPLACE(METADATA, '(, )?"toggle": \\[[^}]+\\](, )?', '')
--- showOptions has BOTH "toggle" and "isRequired"
-where METADATA rlike '"showOptions": {"toggle": \\[[^}]+\\]'
-  and METADATA rlike '"showOptions": {.*"isRequired": (true|false)'
-;