diff OrthancServer/DatabaseWrapper.cpp @ 1712:a7745f3a2cc4 db-changes

integration mainline->db-changes
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 16 Oct 2015 17:36:59 +0200
parents 5ebd6cbb3da8 d72cf0c11f42
children 3926e6317a43
line wrap: on
line diff
--- a/OrthancServer/DatabaseWrapper.cpp	Fri Oct 16 17:36:07 2015 +0200
+++ b/OrthancServer/DatabaseWrapper.cpp	Fri Oct 16 17:36:59 2015 +0200
@@ -360,10 +360,15 @@
     {
       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.
+      // consists in reconstructing the main DICOM tags information
+      // (as more tags got included).
       db_.BeginTransaction();
+      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_.Execute("UPDATE GlobalProperties SET value=\"6\" WHERE property=" +
+                  boost::lexical_cast<std::string>(GlobalProperty_DatabaseSchemaVersion) + ";");
       db_.CommitTransaction();
       version_ = 6;
     }