diff OrthancServer/DatabaseWrapper.cpp @ 1709:2ad22b2970a2 db-changes

SearchableStudies
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 13 Oct 2015 17:48:30 +0200
parents 4c5a85c3ff43
children 5ebd6cbb3da8
line wrap: on
line diff
--- a/OrthancServer/DatabaseWrapper.cpp	Tue Oct 13 16:57:55 2015 +0200
+++ b/OrthancServer/DatabaseWrapper.cpp	Tue Oct 13 17:48:30 2015 +0200
@@ -359,11 +359,13 @@
     if (version_ == 5)
     {
       LOG(WARNING) << "Upgrading database version from 5 to 6";
-      // No change in the DB schema, the step from version 5 to 6 only
-      // consists in reconstructing the main DICOM tags information.
       db_.BeginTransaction();
+      ExecuteUpgradeScript(db_, EmbeddedResources::UPGRADE_DATABASE_5_TO_6);      
+      // Reconstruct the main DICOM tags information.
+      Toolbox::ReconstructMainDicomTags(*this, storageArea, ResourceType_Patient);
       Toolbox::ReconstructMainDicomTags(*this, storageArea, ResourceType_Study);
       Toolbox::ReconstructMainDicomTags(*this, storageArea, ResourceType_Series);
+      Toolbox::ReconstructMainDicomTags(*this, storageArea, ResourceType_Instance);
       db_.CommitTransaction();
       version_ = 6;
     }    
@@ -484,5 +486,4 @@
       target[key] = s.ColumnString(1);
     }
   }
-
 }