From 163c782f3e38a8d234e2e4a27c4c1c54c933dd50 Mon Sep 17 00:00:00 2001 From: MounaSafiHarab Date: Tue, 15 Mar 2016 12:29:03 -0400 Subject: [PATCH 1/3] Made the default imaging upload path in sync with the installation script --- SQL/0000-00-03-ConfigTables.sql | 2 +- SQL/2016-03-10-DefaultMRIUploadPath.sql | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 SQL/2016-03-10-DefaultMRIUploadPath.sql diff --git a/SQL/0000-00-03-ConfigTables.sql b/SQL/0000-00-03-ConfigTables.sql index f0ebb143e88..be0a1800f11 100644 --- a/SQL/0000-00-03-ConfigTables.sql +++ b/SQL/0000-00-03-ConfigTables.sql @@ -141,7 +141,7 @@ INSERT INTO Config (ConfigID, Value) SELECT ID, "%LORISROOT%" FROM ConfigSetting INSERT INTO Config (ConfigID, Value) SELECT ID, "tools/logs/" FROM ConfigSettings WHERE Name="log"; INSERT INTO Config (ConfigID, Value) SELECT ID, "/data/incoming/" FROM ConfigSettings WHERE Name="IncomingPath"; INSERT INTO Config (ConfigID, Value) SELECT ID, "/data/%PROJECTNAME%/bin/mri/" FROM ConfigSettings WHERE Name="MRICodePath"; -INSERT INTO Config (ConfigID, Value) SELECT ID, "/PATH/TO/MRI-Upload/" FROM ConfigSettings WHERE Name="MRIUploadIncomingPath"; +INSERT INTO Config (ConfigID, Value) SELECT ID, "/data/incoming/" FROM ConfigSettings WHERE Name="MRIUploadIncomingPath"; INSERT INTO Config (ConfigID, Value) SELECT ID, "/PATH/TO/Genomic-Data/" FROM ConfigSettings WHERE Name="GenomicDataPath"; -- default gui settings diff --git a/SQL/2016-03-10-DefaultMRIUploadPath.sql b/SQL/2016-03-10-DefaultMRIUploadPath.sql new file mode 100644 index 00000000000..961dc255ac3 --- /dev/null +++ b/SQL/2016-03-10-DefaultMRIUploadPath.sql @@ -0,0 +1 @@ +INSERT INTO Config (ConfigID, Value) SELECT ID, "/data/incoming/" FROM ConfigSettings WHERE Name="MRIUploadIncomingPath" From 99069ba3b4f6303c0c87dfe66d394ccd80ca6e00 Mon Sep 17 00:00:00 2001 From: MounaSafiHarab Date: Thu, 17 Mar 2016 16:30:14 -0400 Subject: [PATCH 2/3] update not insert --- SQL/2016-03-10-DefaultMRIUploadPath.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SQL/2016-03-10-DefaultMRIUploadPath.sql b/SQL/2016-03-10-DefaultMRIUploadPath.sql index 961dc255ac3..f7d63b308b4 100644 --- a/SQL/2016-03-10-DefaultMRIUploadPath.sql +++ b/SQL/2016-03-10-DefaultMRIUploadPath.sql @@ -1 +1 @@ -INSERT INTO Config (ConfigID, Value) SELECT ID, "/data/incoming/" FROM ConfigSettings WHERE Name="MRIUploadIncomingPath" +UPDATE Config AS c, ConfigSettings AS cs SET c.value="/data/incoming/" WHERE c.ConfigID=cs.ID AND cs.Name="MRIUploadIncomingPath"; From 608e35036bf5ba72c0172132e7f261463869a0c2 Mon Sep 17 00:00:00 2001 From: MounaSafiHarab Date: Mon, 21 Mar 2016 10:12:21 -0400 Subject: [PATCH 3/3] updated patch to not overwrite preset MRI upload incoming path --- SQL/2016-03-10-DefaultMRIUploadPath.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SQL/2016-03-10-DefaultMRIUploadPath.sql b/SQL/2016-03-10-DefaultMRIUploadPath.sql index f7d63b308b4..7faf2f3991c 100644 --- a/SQL/2016-03-10-DefaultMRIUploadPath.sql +++ b/SQL/2016-03-10-DefaultMRIUploadPath.sql @@ -1 +1 @@ -UPDATE Config AS c, ConfigSettings AS cs SET c.value="/data/incoming/" WHERE c.ConfigID=cs.ID AND cs.Name="MRIUploadIncomingPath"; +UPDATE Config AS c, ConfigSettings AS cs SET c.value="/data/incoming/" WHERE c.ConfigID=cs.ID AND c.Value="/PATH/TO/MRI-Upload/" AND cs.Name="MRIUploadIncomingPath";