Mercurial > hg > orthanc
comparison OrthancServer/DatabaseWrapper.cpp @ 1711:5ebd6cbb3da8 db-changes
Backed out changeset 2ad22b2970a2
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Fri, 16 Oct 2015 17:36:07 +0200 |
parents | 2ad22b2970a2 |
children | a7745f3a2cc4 |
comparison
equal
deleted
inserted
replaced
1709:2ad22b2970a2 | 1711:5ebd6cbb3da8 |
---|---|
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. | |
362 db_.BeginTransaction(); | 364 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); | |
366 Toolbox::ReconstructMainDicomTags(*this, storageArea, ResourceType_Study); | 365 Toolbox::ReconstructMainDicomTags(*this, storageArea, ResourceType_Study); |
367 Toolbox::ReconstructMainDicomTags(*this, storageArea, ResourceType_Series); | 366 Toolbox::ReconstructMainDicomTags(*this, storageArea, ResourceType_Series); |
368 Toolbox::ReconstructMainDicomTags(*this, storageArea, ResourceType_Instance); | |
369 db_.CommitTransaction(); | 367 db_.CommitTransaction(); |
370 version_ = 6; | 368 version_ = 6; |
371 } | 369 } |
372 } | 370 } |
373 | 371 |
484 { | 482 { |
485 MetadataType key = static_cast<MetadataType>(s.ColumnInt(0)); | 483 MetadataType key = static_cast<MetadataType>(s.ColumnInt(0)); |
486 target[key] = s.ColumnString(1); | 484 target[key] = s.ColumnString(1); |
487 } | 485 } |
488 } | 486 } |
487 | |
489 } | 488 } |