comparison 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
comparison
equal deleted inserted replaced
1708:275780da54ae 1709:2ad22b2970a2
357 } 357 }
358 358
359 if (version_ == 5) 359 if (version_ == 5)
360 { 360 {
361 LOG(WARNING) << "Upgrading database version from 5 to 6"; 361 LOG(WARNING) << "Upgrading database version from 5 to 6";
362 // No change in the DB schema, the step from version 5 to 6 only
363 // consists in reconstructing the main DICOM tags information.
364 db_.BeginTransaction(); 362 db_.BeginTransaction();
363 ExecuteUpgradeScript(db_, EmbeddedResources::UPGRADE_DATABASE_5_TO_6);
364 // Reconstruct the main DICOM tags information.
365 Toolbox::ReconstructMainDicomTags(*this, storageArea, ResourceType_Patient);
365 Toolbox::ReconstructMainDicomTags(*this, storageArea, ResourceType_Study); 366 Toolbox::ReconstructMainDicomTags(*this, storageArea, ResourceType_Study);
366 Toolbox::ReconstructMainDicomTags(*this, storageArea, ResourceType_Series); 367 Toolbox::ReconstructMainDicomTags(*this, storageArea, ResourceType_Series);
368 Toolbox::ReconstructMainDicomTags(*this, storageArea, ResourceType_Instance);
367 db_.CommitTransaction(); 369 db_.CommitTransaction();
368 version_ = 6; 370 version_ = 6;
369 } 371 }
370 } 372 }
371 373
482 { 484 {
483 MetadataType key = static_cast<MetadataType>(s.ColumnInt(0)); 485 MetadataType key = static_cast<MetadataType>(s.ColumnInt(0));
484 target[key] = s.ColumnString(1); 486 target[key] = s.ColumnString(1);
485 } 487 }
486 } 488 }
487
488 } 489 }